redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Long default values are not properly wrapped

Open alekna opened this issue 5 years ago • 2 comments

ReDoc viewers are unable to see full list of default values when long list of default values is in use. Also default value <span> seems to be overlapping with other spans.

Screenshot 2019-10-17 at 11 15 44

Spec:

components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items: {$ref: '#/components/schemas/ValidationError'}
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items: {type: string}
          title: Location
          type: array
        msg: {title: Message, type: string}
        type: {title: Error Type, type: string}
      required: [loc, msg, type]
      title: ValidationError
      type: object
info: {title: Fast API, version: 0.1.0}
openapi: 3.0.2
paths:
  /:
    get:
      operationId: root__get
      parameters:
      - in: query
        name: p
        required: false
        schema:
          default: ['00000000', '11111111', '22222222', '33333333', '44444444', '55555555',
            '66666666', '77777777', '88888888', '99999999', '1010101010101010', '1111111111111111',
            '1212121212121212', '1313131313131313', '1414141414141414', '1515151515151515']
          items: {}
          title: P
          type: array
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema: {$ref: '#/components/schemas/HTTPValidationError'}
          description: Validation Error
      summary: Root

alekna avatar Oct 17 '19 11:10 alekna

Yup, I've been able to reproduce this. It also pushes the span so that any expanding sub schemas overlap the samples on the right hand side whenever a screen is too small.

osamaramihafez avatar Jan 12 '22 18:01 osamaramihafez