Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High-level integration #547

Closed
p1c2u opened this issue Mar 27, 2023 · 0 comments · Fixed by #716
Closed

High-level integration #547

p1c2u opened this issue Mar 27, 2023 · 0 comments · Fixed by #716

Comments

@p1c2u
Copy link
Collaborator

p1c2u commented Mar 27, 2023

Proposal:

OpenAPI class:

openapi = OpenAPI.from_file(
    'openapi.yaml',
    integration=flask.FlaskIntegration(
        xxx="test",
    ),
)

Interface:

openapi.validate_request(flask_request)

openapi.validate_response(flask_response)

@openapi.validate
def test_view(request):
   pass

result = openapi.unmarshal_request(request)

result = openapi.unmarshal_response(response)

@openapi.unmarshal
def test_view(request, result):
    pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant