Skip to content

Petstore-Example: minimum/maximum definitions inconsistent #1458

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

Closed
nknapp opened this issue Sep 23, 2015 · 2 comments
Closed

Petstore-Example: minimum/maximum definitions inconsistent #1458

nknapp opened this issue Sep 23, 2015 · 2 comments
Assignees

Comments

@nknapp
Copy link

nknapp commented Sep 23, 2015

Hi,

I don't know which project contains the example from http://petstore.swagger.io/v2/swagger.json, but I've found some inconsistencies that might need to be corrected:

  • In DELETE /store/order/{orderId} the orderId-parameter has a minimum value set to 1.0, but the type is string. Is this possible in Swagger 2.0? The JSON-Schema-Spec says that minimum needs to be a number, so I would say, that type also needs to be a numeric type (i.e. integer, long, double or float)
  • In GET /store/order/{orderId} the orderId-parameter is of type integer (int64), the description text says "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", but the definition says { minimum: 1.0, maximum: 5.0 }. Is it even possible to define what the description says?
@webron
Copy link
Contributor

webron commented Sep 24, 2015

Yeah, those are indeed issues. FWIW, it doesn't make the definition invalid but rather irrelevant.

The sample itself is found at https://github.com/swagger-api/swagger-samples/tree/master/java/java-jersey-jaxrs - if you'd like to submit a PR to resolve those issues, that would be great!

@nknapp
Copy link
Author

nknapp commented Sep 24, 2015

I won't submit a pull request at the moment. If it would just be about changing a swagger-definition, that would be ok (2 clicks and some editing in the github editor). But cloning a java-project, making the changes and test if the sample is still working. That's too much effort for me at the moment, just to make an example nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants