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

Validation of request parameters/body according to openapi v3 json #67

Closed
Ladas opened this issue May 21, 2019 · 4 comments
Closed

Validation of request parameters/body according to openapi v3 json #67

Ladas opened this issue May 21, 2019 · 4 comments

Comments

@Ladas
Copy link
Contributor

Ladas commented May 21, 2019

Lets design how to share validation in all of our APIs.

I have a POC, which is basically just testing that the validation gem I've picked works for ingress-api https://github.com/ManageIQ/topological_inventory-ingress_api/pull/47/files#diff-fdb60c134b290dc6cd1033a065180563R27

The gem I've picked and battle-tested is ota42y/openapi_parser#33 (with 1 pending PR)

I've tested it on ingress openapi.json which is pretty complex https://github.com/ManageIQ/topological_inventory-ingress_api/blob/master/public/doc/openapi-3-v0.0.2.json


Now how do we want to integrate this to all of our APIs? As a before_action for controller? Into rack middleware (existing project is https://github.com/interagent/committee but supports only 1 schema per server)?. More thoughts?

@Ladas
Copy link
Contributor Author

Ladas commented May 21, 2019

cc @Fryguy @agrare @gmcculloug @abellotti @bdunne who else might be interested?

@gmcculloug
Copy link
Contributor

@Ladas Seeing @gtanzillo missing from the list is making me wonder if you meant him and not me. 🤔

@Ladas
Copy link
Contributor Author

Ladas commented May 22, 2019

@gmcculloug ah I wanted to add all gregs :-) @Fryguy said that your team should be involved too, since we want the request validation in all services

@Ladas
Copy link
Contributor Author

Ladas commented Jul 4, 2019

Implemented as before_action, @gmcculloug you should be able to use this in your projects for validation of API requests.

@Ladas Ladas closed this as completed Jul 4, 2019
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