-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,7 +201,6 @@ paths: | |
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'200': | ||
description: successful operation | ||
|
@@ -234,7 +233,6 @@ paths: | |
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: name | ||
in: query | ||
description: Name of pet that needs to be updated | ||
|
@@ -271,7 +269,6 @@ paths: | |
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'400': | ||
description: Invalid pet value | ||
|
@@ -293,7 +290,6 @@ paths: | |
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: additionalMetadata | ||
in: query | ||
description: Additional Metadata | ||
|
@@ -334,7 +330,6 @@ paths: | |
type: object | ||
additionalProperties: | ||
type: integer | ||
format: int32 | ||
security: | ||
- api_key: [] | ||
/store/order: | ||
|
@@ -382,7 +377,6 @@ paths: | |
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'200': | ||
description: successful operation | ||
|
@@ -413,7 +407,6 @@ paths: | |
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'400': | ||
description: Invalid ID supplied | ||
|
@@ -503,12 +496,10 @@ paths: | |
description: calls per hour allowed by the user | ||
schema: | ||
type: integer | ||
format: int32 | ||
X-Expires-After: | ||
description: date in UTC when token expires | ||
schema: | ||
type: string | ||
format: date-time | ||
content: | ||
application/xml: | ||
schema: | ||
|
@@ -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 commentThe 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! |
||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
example: 10 | ||
petId: | ||
type: integer | ||
format: int64 | ||
example: 198772 | ||
quantity: | ||
type: integer | ||
format: int32 | ||
example: 7 | ||
shipDate: | ||
type: string | ||
format: date-time | ||
status: | ||
type: string | ||
description: Order Status | ||
|
@@ -637,14 +623,11 @@ components: | |
example: approved | ||
complete: | ||
type: boolean | ||
xml: | ||
name: order | ||
type: object | ||
Customer: | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
example: 100000 | ||
username: | ||
type: string | ||
|
@@ -677,24 +660,18 @@ components: | |
name: address | ||
type: object | ||
Category: | ||
x-swagger-router-model: io.swagger.petstore.model.Category | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
example: 1 | ||
name: | ||
type: string | ||
example: Dogs | ||
xml: | ||
name: category | ||
type: object | ||
User: | ||
x-swagger-router-model: io.swagger.petstore.model.User | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
example: 10 | ||
username: | ||
type: string | ||
|
@@ -716,32 +693,23 @@ components: | |
example: 12345 | ||
userStatus: | ||
type: integer | ||
format: int32 | ||
example: 1 | ||
description: User Status | ||
xml: | ||
name: user | ||
type: object | ||
Tag: | ||
x-swagger-router-model: io.swagger.petstore.model.Tag | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
xml: | ||
name: tag | ||
type: object | ||
Pet: | ||
x-swagger-router-model: io.swagger.petstore.model.Pet | ||
required: | ||
- name | ||
- photoUrls | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
example: 10 | ||
name: | ||
type: string | ||
|
@@ -771,14 +739,11 @@ components: | |
- available | ||
- pending | ||
- sold | ||
xml: | ||
name: pet | ||
type: object | ||
ApiResponse: | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
type: | ||
type: string | ||
message: | ||
|
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.