Describe the bug
When using the “Send API Request” block, the default value of a parameter (if defined in the OpenAPI schema) is not prefilled in the input field. This forces users to manually enter the value, even when a default is explicitly set.
Expected behavior
If a parameter has a defined default value in the OpenAPI schema, the input field should automatically be prefilled with that value. For enum parameters, the default option should be preselected.
Possible solution
Respect the default value and prefill proper input or select in case of enum with that value
Steps to reproduce
- Define an OpenAPI schema with a parameter that includes a default value:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: Add a new pet to the store
operationId: addPet
parameters:
- in: query
name: limit
required: true
schema:
type: number
default: 10
- Generate the API documentation page.
- Check the input field for the
limit query parameter in the “Send API Request” block.
Screenshots
Context
It is annoying to force a user to choose the right value for the parameter, especially in cases when there is one possible value for the parameter, but the parameter is required
Your Environment
Irrelevant to the environment
Describe the bug
When using the “Send API Request” block, the default value of a parameter (if defined in the OpenAPI schema) is not prefilled in the input field. This forces users to manually enter the value, even when a default is explicitly set.
Expected behavior
If a parameter has a defined default value in the OpenAPI schema, the input field should automatically be prefilled with that value. For enum parameters, the default option should be preselected.
Possible solution
Respect the default value and prefill proper input or select in case of enum with that value
Steps to reproduce
limitquery parameter in the “Send API Request” block.Screenshots
Context
It is annoying to force a user to choose the right value for the parameter, especially in cases when there is one possible value for the parameter, but the parameter is required
Your Environment
Irrelevant to the environment