-
Notifications
You must be signed in to change notification settings - Fork 98
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
Array of schema inside another schema #17
Comments
The keys are case-sensitve, can you try |
My bad. I corrected the typo I made above. I just fabricated the above example to describe the problem I am having. My real models have so many properties and the capitalization is correct on the actual models. |
Also, in Swagger JSON I believe you must use an |
yes, I tried to use |
I just added an example for arrays in schema objects. So you would do something like: property :chapters do
key :type, :array
items do
key :'$ref', :Chapter
end
end Let me know if that works. |
Yes it works 👍 Thank you 😃 |
How can one do this ??? |
I want to define a swagger schema/model for
Book
that has and array of chapters inside. I want the following JSON:So I defined the following two swagger schemas:
But I end up getting the following in the generated swagger documentation for
Book
:What is the proper way to define an array of a schema inside another schema?
The text was updated successfully, but these errors were encountered: