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

How to validate method at operationId matches openapi schema #1614

Closed
ReallyLiri opened this issue Dec 28, 2022 · 3 comments
Closed

How to validate method at operationId matches openapi schema #1614

ReallyLiri opened this issue Dec 28, 2022 · 3 comments

Comments

@ReallyLiri
Copy link

Is there any way to statically check, ahead of making api calls, that a method defined as the operationId of some path actually matches the schema specified by openapi manifest?

@RobbeSneyders
Copy link
Member

This is currently only done at runtime. In theory it would be possible to do at startup as well.

@ReallyLiri
Copy link
Author

Could you point me to where its done at runtime?

@RobbeSneyders
Copy link
Member

We don't even really validate the method signature. We just inspect it to provide the unpacked arguments.

On main (v3.X):
https://github.com/spec-first/connexion/blob/main/connexion/decorators/parameter.py#L38
On v2.X (current release):
https://github.com/spec-first/connexion/blob/v2/connexion/decorators/parameter.py#L79

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

No branches or pull requests

2 participants