-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Description:
The API playground currently uses schema.default values to pre-fill request parameters, which creates a poor UX when developers want to quickly test endpoints. This forces documentation authors to choose between two bad options:
- Set incorrect "default" values just to make the playground work
- Leave the playground with empty/invalid parameters that require manual input
Proposed Solution:
Change the API playground to prioritize schema.example values over schema.default values when pre-filling request parameters. This would allow developers to hit "play" and immediately send a valid request with meaningful test data.
Expected Behavior
When both schema.example and schema.default exist, use schema.example for playground pre-fill
Fall back to schema.default only when no example is provided
This maintains semantic correctness while improving the testing workflow
Current Behavior
The playground displays schema.default values as implemented in #1065, which prioritizes showing actual default values rather than example values.
Impact
This change would significantly improve the developer experience by enabling one-click API testing with realistic data while maintaining proper OpenAPI schema semantics.