Open mtennoe opened 5 years ago
There are a few valid ways to define additionalProperties.
additionalProperties
To define a dictionary, use type: object and use the additionalProperties keyword to specify the type of values in key/value pairs. Instead of using an inline schema, additionalProperties can $ref another schema If the dictionary values can be of any type (aka free-form object), use additionalProperties: true
To define a dictionary, use type: object and use the additionalProperties keyword to specify the type of values in key/value pairs.
type: object
Instead of using an inline schema, additionalProperties can $ref another schema
If the dictionary values can be of any type (aka free-form object), use additionalProperties: true
https://swagger.io/docs/specification/data-models/dictionaries/
But might be best for the implementation to follow the OpenAPI/Swagger spec, and only allow for valid dictionary types.
Could maybe also handle some of these other invalid cases.
Originally posted by @scottc in https://github.com/mtennoe/swagger-typescript-codegen/pull/63#issuecomment-471845561
@scottc FYI
There are a few valid ways to define
additionalProperties
.https://swagger.io/docs/specification/data-models/dictionaries/
But might be best for the implementation to follow the OpenAPI/Swagger spec, and only allow for valid dictionary types.
Could maybe also handle some of these other invalid cases.
Originally posted by @scottc in https://github.com/mtennoe/swagger-typescript-codegen/pull/63#issuecomment-471845561