Skip to content

Show only required params in API playground examples#312

Open
shirgoldbird wants to merge 1 commit intomainfrom
fix/playground-optional-params
Open

Show only required params in API playground examples#312
shirgoldbird wants to merge 1 commit intomainfrom
fix/playground-optional-params

Conversation

@shirgoldbird
Copy link
Copy Markdown
Member

@shirgoldbird shirgoldbird commented Apr 21, 2026

Summary

  • Sets api.examples.defaults to "required" in docs.json so the Mintlify playground only includes required parameters (text, target_lang) in generated curl snippets
  • Previously, all optional fields (glossary_id, formality, model_type, translation_memory_id, etc.) were pre-populated with example values, causing a messy experience and confusing 400 errors when users hit Send

Before

image

After

image

Test plan

  • Verified locally with mintlify dev — playground curl now only shows text and target_lang
  • Confirm on staging deploy that optional fields still appear in the left-side form for users to fill in manually

🤖 Generated with Claude Code

Set api.examples.defaults to "required" so the Mintlify playground
only includes required parameters (text, target_lang) in generated
curl snippets instead of pre-populating every optional field.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 21, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
deepl-c950b784 🟢 Ready View Preview Apr 21, 2026, 4:53 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant