#7219·scalar

show schemas in api client

Author: hanspagelCreated Oct 31, 2025Updated Sep 1, 2026
Labelsenhancementpackage: @scalar/api-clientschema

Discussed in https://github.com/scalar/scalar/discussions/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.