-
Notifications
You must be signed in to change notification settings - Fork 31
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
"using" in an entity without declaring an OpenAPI array #46
Comments
Hi, that happens, because DBIx::Class's If you could provide me with sample data and application maybe I might help then. Thanks. |
In order to demonstrate khrt#46
The problem is that swagger.json does not agree with the generated output. For example in the music app, swagger.json claims that
However,
You can fix this when an array is returned, eg. .... but you cannot fix this where a single object is returned, such as with the Causes Is there some way I can get the generated swagger to agree with the returned data for the |
From what I understand now, it is not possible to reach the agreement between Swagger and the presenter. As a solution to that we can introduce an argument to Entitie's What do you think? |
That would make sense to me. Also potentially useful for representing a |
Hello,
I am trying to use Raisin for an API which returns a single row of data, read by calling DBIx::Class's
->find()
. I am having trouble making the generated OpenAPI / Swagger schema agree with the generated JSON.I have two Raisin::Entity classes. One represents the row from DBIx::Class. The other represents the JSON data presented by an endpoint. It refers to the first via
expose 'data', using => ...
. When the Swagger schema is generated, it declared thedata
is an array, when it is in fact an object represented by a hash.Is there a way to make Raisin generate a schema matching the returned data?
Many thanks,
Dave
The text was updated successfully, but these errors were encountered: