Skip to content

Fall back to schema-root example(s) for body examples #31

Description

@KeremTurgutlu

#30 surfaces media-type-level examples/example in op docs. Some specs (e.g. Anthropic's POST /v1/messages) instead put a complete whole-payload example inside the root request schema (schema.example in 3.0, schema.examples array in 3.1) — currently dropped.

Follow-up: in _body_params, when the media type has no examples, resolve the schema and read its root example (or first of examples) as a {"default": {"value": ...}} body example. Root-level only — property-level examples are a separate issue.

Coverage scan: Anthropic 5/13 body ops have only this form (incl. /v1/messages); GitHub 10; Cloudflare 25.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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