Skip to content

show schemas in api client #7219

@hanspagel

Description

@hanspagel

Discussed in #6982

Originally posted by OrkanCom October 1, 2025

Problem

When adding custom examples to OpenAPI specification, Scalar's request dropdown only shows the custom examples. There's no way to access the auto-generated schema fields that Scalar originally displayed.

Current Behavior

  • Without custom examples: Scalar auto-generates request body from schema.
  • With custom examples: Only custom examples appear in drop-down, no way to see all available schema fields.

Expected Behavior

The dropdown should include both:

  1. "Schema" or "Default" option - showing all fields auto-generated from OpenAPI schema.
  2. Custom examples from the specification.

Use Case

Developers need to:

  • See all available fields in the API (schema-generated)
  • Quickly test with pre-filled examples (custom examples)
  • Switch between these two views easily

Screenshot

image

Proposed Solution

Add a reserved example name (e.g., "$schema") or automatically prepend a schema-based example to the dropdown when custom examples exist.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions