Skip to content

Truncate long string leaves when rendering body examples #33

Description

@KeremTurgutlu

Some media-type examples embed large blobs — e.g. GitHub's repos.create_attestation example is ~10KB of base64 (canonicalizedBody, rawBytes, payload), bloating __doc__ for LLM consumption.

Follow-up: in _examples_doc (from #30), recursively cap string leaves at render time (e.g. >~100 chars → prefix…+N chars), keeping OpSpec.body_examples lossless. No content sniffing needed: capping leaf length handles base64 automatically while normal prose/URLs pass through. Optionally also cap examples shown per op.

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