-
Notifications
You must be signed in to change notification settings - Fork 1
Definition Tests
Omar del Valle edited this page Jun 10, 2019
·
11 revisions
Run tests:
driven-swagger-test ./swagger.yaml
√ Should be contain (200,202,206) response.
√ Should be contain consumes (accept) definition.
√ Should be contain (200,201,202,204,206) response.
√ Should be contain (400) response.
√ Should be contain produces (content-type) definition.
√ Should be contain (200,202,204,206) response.
√ Should be contain (400) response.
√ Should be contain produces (content-type) definition.
√ Should be contain (200,202,204) response.
√ Should be contain produces (content-type) definition.
√ Parameter distinct of type string, in PATH or QUERY, should be contain bad request (400) response.
√ Enum parameters in PATH or QUERY, should be contain bad request (400) response.
√ Parameters required in PATH or QUERY, should be contain not found (404) response.
√ (Warning) Parameters required in QUERY, maybe should be change to 'in: path' definition.
√ Query string parameter [PARAM-NAME] should be lower case.
Special case x-pm-test-ignore404
What would happend if you define GET /pet/findByStatus?status=pending and don't have results?
- Do you prefer to return 404? (default)
- Do you prefer to return 200 and an empty array? (use
x-pm-test-ignore404: truein swagger)
/pet/findByStatus:
get:
x-pm-test-ignore404: true
tags:
- "pet"
summary: "Finds Pets by status"
description: "Multiple status values can be provided with comma separated strings"
operationId: "findPetsByStatus"
consumes:
- "application/json"
parameters:
- name: "status"
in: "query"
description: "Status values that need to be considered for filter"
required: true
type: "array"
items:
type: "string"
enum:
- "available"
- "pending"
- "sold"
√ Security definition, should be contain (401) response.