-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use example attribute to determine the value of a parameter
- Loading branch information
1 parent
c8f3b10
commit a3d91ec
Showing
5 changed files
with
251 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
w3af/core/data/parsers/doc/open_api/tests/data/int_param_with_example_json.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "1.0.0", | ||
"title": "Swagger Petstore", | ||
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", | ||
"termsOfService": "http://swagger.io/terms/", | ||
"contact": { | ||
"name": "Swagger API Team" | ||
}, | ||
"license": { | ||
"name": "MIT" | ||
} | ||
}, | ||
"host": "petstore.swagger.io", | ||
"basePath": "/api", | ||
"schemes": [ | ||
"http" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/pets": { | ||
"post": { | ||
"description": "Creates a new pet in the store.", | ||
"operationId": "addPet", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "pet", | ||
"in": "body", | ||
"description": "Pet to add to the store", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/Pet" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "pet response", | ||
"schema": { | ||
"$ref": "#/definitions/Pet" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Pet": { | ||
"type": "object", | ||
"required": [ | ||
"count" | ||
], | ||
"properties": { | ||
"count": { | ||
"type": "integer", | ||
"format": "int32", | ||
"example": 666999 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.