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

Need a way to specify a Map of key/value pairs in an object's model. #241

Closed
rage-shadowman opened this issue Jun 20, 2013 · 1 comment
Closed

Comments

@rage-shadowman
Copy link

There is no way to specify a Map of key/value pairs to be displayed in the UI.

If the key is an enum, then all of the enum's values could be included as optional object properties.

If the key is a "string", then maybe the word "string" with a "..." on the following line (or maybe just "MapKey").

The value object should be expanded as per the usual rules for a model's property type.

Thus type="Map[SomeEnum,SomeObject]" could be expanded as:
...
"SomeEnumVal1": { "someObjectProperty": "someObjectPropertyType" },
"SomeEnumVal2": { "someObjectProperty": "someObjectPropertyType" },
...

And type="Map[KeyObject,Array[SomeObject]]" could be expanded as:
"MapKey[KeyObject]": [ { "someObjectProperty": "someObjectPropertyType" } ]
...

@webron
Copy link
Contributor

webron commented Apr 7, 2014

This discussion is moved to the swagger-spec repository as it first needs to be resolved in the swagger specification - OAI/OpenAPI-Specification#38.

@webron webron closed this as completed Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants