Skip to content

[BUG][csharp] [csharp-netcore] producing invalid Dictionary #9727

@InTheCloudDan

Description

@InTheCloudDan

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
openapi-generator version

5.1.1
and
5.2.0-20210607.065944-108

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
      "example": {
        "type": "object",
        "additionalProperties": true
      }

or additionalProperties: {}

Create a spec with the model above and use csharp or csharp-netcore to generate a client. It errors with error CS0305: Using the generic type 'Dictionary<TKey, TValue>' requires 2 type arguments

The property in code shows as Dictionary without any additional type information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions