Skip to content

Rendering issue with longer strings in a code block of requestBody #2668

Open
@benjefferies

Description

@benjefferies

Describe the bug
When adding a code block to a requestBody parameter that contains a longer string the rendering of the columns overlap

Expected behavior
Code block is scrollable and columns maintain size

openapi: 3.0.0
info:
  title: Simple API
  version: 1.0.0
paths:
  /api/v1/studies/:
    post:
      summary: Create a draft study
      description: Create a new draft study
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateStudy"
      responses:
        "201":
          description: Created
components:
  schemas:
    CreateStudy:
      type: object
      required:
        - name
        - external_study_url
        - prolific_id_option
        - completion_codes
        - reward
        - total_available_places
      properties:
        is_external_study_url_secure:
          type: boolean
          description: |-
            ```json
              {
                "name": "My study",
                "external_study_url": "https://example.com/path/path2/path3/path4",
                "prolific_id_option": "required",
                "completion_codes": ["abc123"],
                "reward": 1.0,
                "total_available_places": 100
              }
            ```

Screenshots

Image

Additional context
Reducing external_study_url characters fixes rendering issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions