-
Notifications
You must be signed in to change notification settings - Fork 92
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
collectionFormat always at "None" when swagger spec don't explicitly set it #101
Comments
Yes, that's a bug and thanks for pointing it out.
collectionFormat: 'csv' # instead of None
self.__collection_format = getattr(obj, 'collectionFormat', 'csv') |
the fix is included in v0.8.25, please feel free to reopen this issue when anything goes wrong |
I am getting this error again in v0.8.29 with embedded arrays in response. Should I reopen this issue? |
@surajbarkale-dolby I prefer to open an new issue, which is easier for maintenance. Could you also provide a sample input / output of your problem if your case is not covered by this test case? |
The swagger spec I'm calling don't define "collectionFormat" as the default value, according to OAI spec, is "csv".
But, currently, when i'm doing call with arrays, pyswagger always return "None" for the collectionFormat instead of "csv" and I have this error:
After digging a little in pyswagger code, what i've found is that this line https://github.com/mission-liao/pyswagger/blob/master/pyswagger/primitives/_array.py#L20 always return "None" instead of "csv".
So i checked that value, and no matter what it's always at "None".
So far, i've found a way to avoid this issue ( but I don't actually know if there will be some impacts on the other endpoints) by adding this before I create my App object :
So it gives:
Thank you for your help and answers
The text was updated successfully, but these errors were encountered: