-
Notifications
You must be signed in to change notification settings - Fork 90
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
ValueError: Can't resolve type from:(number, int32) #127
Comments
You can extend the supported primitives by following this tutorial. If it doesn't work or not fit your needs, please feel free to let me know. |
Is that the correct way to do it ?
FYI: your doc is missing About the issue itself: i don't mind having to implement myself primitive builder for custom types. Imho, you should support these: because swagger-codegen didn't throw any errors with that type/format, neither does other libs like bravado for example... and swagger validators do not yell at these either. But well, it's up to you at the end. Thanks ! |
Do you know this one is outdated https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/2.0.md#data-types ? To quote the spec (from swagger.io):
And if you follow the JSON-Schema Draft 4 link, you get what I quoted before :
FYI, from my test, this is how is defined the "number/int32" using swagger-codegen in the API class comments:
But tbh, since there are no validation in the client, I don't believe that having it as float is the right solution (especially since it's an Hopes this helps / explains better everything :) And thanks for your work ! 👍 |
|
Link the the swagger.json used: https://esi.tech.ccp.is/latest/swagger.json?datasource=tranquility
It looks like every endpoints that have this issue use a referenced parameters which is a "number" / "int32" format.
If I understand correctly types defined in the JSON-Schema Draft 4. Models, used by swagger,
number also contains integer by definition, so
integer/int32
should work (which is not the case currently).(also swagger validator do not report any issues with
number/int32
andnumber/int64
. )Can you correct this ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: