Skip to content

Request body rendering for application/jose content-type #622

@Wachiwi

Description

@Wachiwi

When having a different content type than application/json or application/xml the rendering of the schema is slightly confusing. E.g. we use application/jose at some points of our spec and it doesn't get rendered at all (see image below)

image

When using something like that I would expect it to render at least : string as it does it with text/plain since application/jose is represented as a base64 string.

Below you can find an attached example.

Example spec
openapi: 3.0.0
info:
  version: 4.2.0
  title: Whatsoever
  description: nah
paths:
  /ep:
    post:
      summary: POST stuff
      requestBody:
        required: true
        content:
          application/jose:
            schema:
              title: Title
              description: This is a description
              type: string
            examples:
              E1:
                value: ajasdjasdsad
          text/plain:
            schema:
              title: Title
              description: This is a description
              type: string
            examples:
              E1:
                value: ajasdjasdsad

      responses:
        '200':
          description: OK
          content:
            application/jose:
              schema:
                title: Anlage
                description: Verschlüsselte Anlage im Format JSON Web Encryption (JWE) laut RFC7516
                type: string
                pattern: '^[a-zA-Z0-9-_=.]+$'

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