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

request help: How to validate request in APISIX #1643

Closed
sshniro opened this issue Jun 3, 2020 · 3 comments · Fixed by #1709
Closed

request help: How to validate request in APISIX #1643

sshniro opened this issue Jun 3, 2020 · 3 comments · Fixed by #1709

Comments

@sshniro
Copy link
Member

sshniro commented Jun 3, 2020

Issue description

I would like to validate requests before sending to up-streams, for example:

header_data = {
  auth_header = {required, type = 'string'}
}
body_data = {
  payload_1 = {required, type = 'boolean'},
  payload_2 = {optional}
}
@moonming
Copy link
Member

moonming commented Jun 4, 2020

@membphis can json-schema do this job?

@membphis
Copy link
Member

json-schema is powerful enough for this feature.

@sshniro
Copy link
Member Author

sshniro commented Jun 13, 2020

Thanks, I have created a request validator plugin using the JSON schema validator. Please do have a look.

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 a pull request may close this issue.

3 participants