-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Empty parameters array in swagger 2.0 spec yields a validation error #395
Comments
After further digging, this is a bug surfaced from the swagger 2.0 spec as it is defined by apigee-127/swagger-tools. |
The schema has updated to fix this issue. It will get resolved when we update to the latest swagger-tools which has latest schema. |
@whitlockjc I thought you updated the schema in swagger-tools already. Please open a ticket in swagger-tools for updating the schema in the next release and link it to this issue if it's not the case |
I did not, I've not put any time to swagger-tools due to other projects. I'll get it fixed tomorrow. |
It looks like swagger-tools has updated the schema. |
@who it's not published yet. @whitlockjc |
Fix for this is deployed now. |
🤘 Thank you! |
I still get the error. |
That has nothing to do with the topic of this issue. |
If you have a HTTP GET path defined with an empty parameters array, the built-in validator will complain.
Here's a yaml block you can use for repro:
The validator message contains this:
Array is too short (0), minimum 1
code: "ARRAY_LENGTH_SHORT"
message: "Array is too short (0), minimum 1"
path: Array [4]
0: "paths"
1: "/persons"
2: "get"
3: "parameters"
description: "The parameters needed to send a valid API call."
level: 900
It appears this issue is similar to swagger-api/validator-badge#11
The text was updated successfully, but these errors were encountered: