-
Notifications
You must be signed in to change notification settings - Fork 0
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
Validate request bodies using ajv #20
base: add-post-body-to-har-requests
Are you sure you want to change the base?
Conversation
Now post data is added to incoming requests. This paves the way for veriyfing their content against openapispec in future commits.
We now check the request body to see if content was set. For now only works with application/json
The application now checks if incoming request bodies match the defined schema using ajv. Only applies to application/json.
@@ -201,7 +201,6 @@ paths: | |||
required: true | |||
schema: | |||
type: integer | |||
format: int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #19
For now I'm just going to say that we don't support custom formats.
We will add them once we feel that ajv works for our use case.
@@ -610,23 +601,18 @@ externalDocs: | |||
components: | |||
schemas: | |||
Order: | |||
x-swagger-router-model: io.swagger.petstore.model.Order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we want to support? It's not part of the schema ajv understands out of the box.
It's not hard too add these but I'm not entirerly sure how common they are in the wild!
5c32f84
to
46e7d7e
Compare
05dd717
to
f9f07b8
Compare
The application now checks if incoming request bodies match the defined
schema using ajv. Only applies to application/json.