Skip to content

Support to add schemas to the OpenAPI spec explicitly #213

@oat-mirror

Description

@oat-mirror

Sorry, the issue was submitted late

The specific problems are as follows

Like this doc, both RequestDTO and ResponseDTO will be displayed on the schema component of OpenAPI

class A(MethodView):
    @input(RequestDTO, location="json")
    @output(ResponseDTO)
    def post(self, data):
        return {}

But not every schema is nested or explicitly used, such as checking data with marshmallow or dynamically specifying which schema to use, which cannot be displayed on the openapi.

Like this schema, it is dynamically loaded in the web app, but it wants to be displayed in the schema

class S(Schema):
    f1 = fields.String()
    f2 = fields.String()

I hope there is a place to manually configure schema components in apiflask,TKS

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions