Skip to content

refactor(openapi): extract operation schema building into OperationSchemaBuilder#1633

Open
eadwinCode wants to merge 4 commits intovitalik:masterfrom
eadwinCode:refactor/extract-openapi-builder
Open

refactor(openapi): extract operation schema building into OperationSchemaBuilder#1633
eadwinCode wants to merge 4 commits intovitalik:masterfrom
eadwinCode:refactor/extract-openapi-builder

Conversation

@eadwinCode
Copy link
Copy Markdown
Contributor

Introduce Builder pattern for OpenAPI operation schema generation by
extracting operation-specific logic from OpenAPISchema into a dedicated
OperationSchemaBuilder class.

Changes:

  • Add new OperationSchemaBuilder class with OperationSchemaResult dataclass
  • Move parameter, request body, response, and security schema building
    to the OperationSchemaBuilder
  • Simplify OpenAPISchema to focus on document computation
  • Add get_operation_builder_type() method to Operation for extensibility
  • Export new classes from ninja.openapi module

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