Open Ziaccro opened 8 years ago
As a workaround, you can describe result
as type: object
, which means arbitrary JSON object and the developers will need to deserialize the object themselves.
you mean all the json return as object or just the node result ?
with this solution I lose clarity on documentation and its unfortunate to force the user to reparse json
I will try to modify the swagger-codegen and add "general scheme" on it
can you give me some file name from what started reading the code please ?
Just the node result.
Can you share the full spec?
yes sure its here https://test-api.particeep.com/docs/swagger.json
Description
Hello, i want to know if there is a option to set a specif node to get the result of the json ?
All endpoint of our api return same schema response ApiResult[T], for exemple when i get user with findById, on the node result i get the User ApiResult[User]
the user is on node result
the problem is, on swagger spec we define as return the model User, on error we describes Error ect ...
in the spec swagger we can't template this and its not a good idea of write model ApiResultUser, ApiResultAddress, ApiResultEnterprise, ... the number of class is huge
i hope there is a workaround, a way to change the method ApiInvoked.deserialize ?
otherwise the code generate is not usable, that fail on the validation of json