Skip to content

OpenAPI schema code block not rendering on mobile devices #782

@LeRoiLambda

Description

@LeRoiLambda

When viewing documentation pages that use the openapi-schema frontmatter to embed schema code blocks, the schema renders correctly on desktop browsers but is completely absent on mobile (smartphone) viewports.

Steps to Reproduce

  • Create an OpenAPI file (e.g. openapi.yaml) in your project with the following contents:
openapi: 3.0.0
info:
  title: Simple Order API
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /order-items:
    get:
      summary: Retrieve a list of order items
      responses:
        '200':
          description: A JSON array of order items
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderItem'
components:
  schemas:
    OrderItem:
      type: object
      description: An item in an order
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the order item
        name:
          type: string
          description: Name of the product
        quantity:
          type: integer
          description: Number of items ordered
        price:
          type: number
          format: float
          description: Price per item
      required:
        - id
        - name
        - quantity
        - price
  • Add an MDX page (e.g. order-item.mdx) that references the schema:
---
openapi-schema: OrderItem
---
  • Build your Mintlify docs.
  • View the page on desktop (full-width browser window) and confirm you see the generated schema block.
  • Resize the desktop window to a narrow width (or open the same page on a smartphone) and observe that the schema block is missing.

Expected Behavior
The openapi-schema code block should render consistently across all viewport sizes, including both desktop and mobile browsers.

Actual Behavior

  • Desktop: Schema block is visible(left).
  • Mobile: Schema block is missing(right).
    image

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