You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@serggl … mmh, think it has to do with the model_name stuff you commented
did it behaves same, if you remove the models parameter on add_swagger_documentation?
yes @LeFnord. Actually after looking into source code, I can suggest that it has nothing to do with the models option, which is a bit useless since it adds records to definitions section of the output json after everything (request/response/parameters objects) was parsed. PR is on the way..
In particular it is broken for parameters which data type is
Grape::Entity
Here is a maple API and entities definition:
And here is how it looks like in swagger:
One the last screenshot you can also notice that data type names are quite different, but they should represent the same type.
Here is a swagger json generated for this API class:
Seems like a proper data type link should be
"$ref": "#/definitions/A"
instead of"type": "Rest::Sales::Root::A"
The text was updated successfully, but these errors were encountered: