-
Notifications
You must be signed in to change notification settings - Fork 59
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
Map with string array as values #74
Comments
@tomashq, Did you find a solution for this? |
It's likely possible to define your custom schema with the @jsonschema annotation. However I'm not sure how to do it exactly. Simple examples for arrays and maps I got to work:
For simple object/maps the same works:
What's missing right now is to annotate a class with Type Information. I'll open another ticket since this looks like a more generic issue. |
Workaround in general is to define the JSONSchema manually. I provided an example in #98.
For your case @tomashq you can use this:
That shows the following JSONSchema in swagger for me:
Now this ticket can be closed. |
would this way work for @isarray() too?
|
I actually found a better way for Object in arrays.
my example would look like this my CreatePostDTO looks like this
|
hi,
I would like to generate OpenAPI specs for a payload which would contain a map with string[] as values.
Example:
I can't seem to find a right way to annotate class properties in order to generate correct specs that would reflect above JSON shape.
I tried few approaches but nothing seemed to work:
string[] as values
another one using class extending string[]
Does 'routing-controllers-openapi' support such case?
Thanks!
Tom
The text was updated successfully, but these errors were encountered: