Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the implementation follow the OpenAPI/Swagger spec for dictionaries #66

Open
mtennoe opened this issue Mar 12, 2019 · 1 comment
Open
Labels

Comments

@mtennoe
Copy link
Owner

mtennoe commented Mar 12, 2019

There are a few valid ways to define 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

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 #63 (comment)

@mtennoe
Copy link
Owner Author

mtennoe commented Mar 12, 2019

@scottc FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant