Skip to content

Deprecate Parameter.content in favor of JSON Schema's contentSchema? #2289

@hkosova

Description

@hkosova

JSON Schema 2019-09 has the contentSchema keyword whose purpose and functionality seems to be the same as that of content in Parameter Objects.

Should Parameter Object's content be deprecated in favor of JSON Schema's contentSchema keyword?

Example:

# Query parameter representation before URL encoding
?data={"foo":"hi","bar":123}

OAS 3.0:

parameters:
  - in: query
    name: data
    content:
      application/json:
        schema:
          type: object
          properties:
            foo:
              type: string
              example: hi
            bar:
              type: integer
              example: 123

OAS 3.1 + contentSchema:

parameters:
  - in: query
    name: data
    schema:
      type: string
      contentMediaType: application/json
      contentSchema:
        type: object
        properties:
          foo:
            type: string
            example: hi
          bar:
            type: integer
            example: 123

Metadata

Metadata

Assignees

No one assigned

    Labels

    media and encodingIssues regarding media type support and how to encode data (outside of query/path params)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions