Skip to content
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

validation failing when describing request body for post request using "style" and "explode" serialization strategy #177

Open
JohnRDOrazio opened this issue Sep 22, 2020 · 0 comments

Comments

@JohnRDOrazio
Copy link

When describing the request body for a post request using "style" and "explode" as serialization strategy for primitive types rather than defining "contentType" (used for more complex serialization strategies), the validation is failing.

Relative documentation is https://swagger.io/docs/specification/describing-request-body/ in the "Form Data" and "Complex Serialization in Form Data" sections.

The API I'm trying to validate is here: https://raw.githubusercontent.com/BibleGet-I-O/endpoint/master/openapi.json

I have defined it using swaggerhub, where it shows as being valid: https://app.swaggerhub.com/apis/JohnRDOrazio/BibleGet/2.8

If instead I try validating with the badge validator: https://validator.swagger.io/validator/debug?url=https://raw.githubusercontent.com/BibleGet-I-O/endpoint/master/openapi.json

I get these errors:

{"messages":["attribute paths.'/index.php'(post).requestBody.content.encoding.contentType is missing","attribute paths.'/metadata.php'(post).requestBody.content.encoding.contentType is missing"],"schemaValidationMessages":[{"level":"warning","domain":"validation","keyword":"format","message":"format attribute \"uri-reference\" not supported","schema":{"loadingURI":"#","pointer":"/definitions/Contact/properties/url"}},{"level":"warning","domain":"validation","keyword":"format","message":"format attribute \"uri-reference\" not supported","schema":{"loadingURI":"#","pointer":"/definitions/License/properties/url"}},{"level":"warning","domain":"validation","keyword":"format","message":"format attribute \"uri-reference\" not supported","schema":{"loadingURI":"#","pointer":"/definitions/Info/properties/termsOfService"}}]}

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

1 participant