Skip to content

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

Description

@JohnRDOrazio

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"}}]}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions