[Feature Request] Add support for separate input/output schemas
New Feature - add an ability to maintain separate schemas for request and response models, similar to FastAPI's implementation.
Current Behavior
Currently, parse_parameters overwrites component schemas (APIView.components_schemas) that were previously extracted by get_responses.
Usually get_responses returns different schemas due tomode="serialization" and we're loosing any additional information (such as @computed_fields)
Proposed Solution
I could add a new configuration option separate_input_output_schemas:
- Defaults to
falseto maintain backward compatibility - When enabled, maintains distinct schemas for:
- Request bodies and parameters
-Inputsuffix - Response models
-Outputsuffix
- Request bodies and parameters
@luolingchun What are your thoughts on this? If you feel this feature would be valuable, I can begin implementation next week. Please share any context or feedback that would help inform the work.
Good idea, thank you in advance for the work you did on this.