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

requestBody media types are not handled generically #669

@jcass77

Description

@jcass77

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions