Skip to content

Conversation

@MattParkerDev
Copy link

Currently, additionalProperties are generated like a dictionary, regardless of the "style" = "deepObject"

example parameter from openapi spec

{
  "name": "attributes",
  "in": "query",
  "required": false,
  "explode": true,
  "style": "deepObject",
  "schema": {
    "minProperties": 1,
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      }
    },
    "additionalProperties": {
      "type": "string"
    }
  }
}

Currently, named properties such as name in the example json, generate correctly in the C# code, however un-named additional properties do not, and should.

as per https://swagger.io/docs/specification/serialization/
image
image

@MattParkerDev
Copy link
Author

@RicoSuter is this something that can be merged? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant