Skip to content

[Feature Request] Add support for separate input/output schemas #211

@dotsbb

Description

@dotsbb

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 false to maintain backward compatibility
  • When enabled, maintains distinct schemas for:
    • Request bodies and parameters -Input suffix
    • Response models -Output suffix

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions