Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

requestBody media types are not handled generically #669

Open
jcass77 opened this issue Dec 10, 2019 · 0 comments
Open

requestBody media types are not handled generically #669

jcass77 opened this issue Dec 10, 2019 · 0 comments

Comments

@jcass77
Copy link

jcass77 commented Dec 10, 2019

There's already a TODO in the code for this, but when parsing the OpenAPI schema, API Star does not seem to cater for media types other than application/json.

The OpenAPI 3 specification makes provision for operations to consume many different media types in requestBody, as per the example for Form Data below:

 /survey:
    post:
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:  # <!--- API Star does not support using this media type
            schema:
              type: object
              properties:
                name:
                  type: string
                fav_number:
                  type: integer
              required:
                - name
                - email

At the moment, using anything other than application/json in the schema will raise a ClientError with code invalid_property.

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

No branches or pull requests

1 participant