Skip to content

Commit

Permalink
update test specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrchen committed Dec 5, 2020
1 parent 831eedc commit 9c79314
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 40 deletions.
67 changes: 27 additions & 40 deletions test/fixture/petstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ paths:
"405":
description: Invalid input
security:
- petstore_auth:
- "write:pets"
- "read:pets"
- token: []
requestBody:
$ref: "#/components/requestBodies/Pet"
put:
Expand All @@ -60,9 +58,7 @@ paths:
"405":
description: Validation exception
security:
- petstore_auth:
- "write:pets"
- "read:pets"
- token: []
requestBody:
$ref: "#/components/requestBodies/Pet"
/pet/findByStatus:
Expand Down Expand Up @@ -100,8 +96,7 @@ paths:
"400":
description: Invalid status value
security:
- petstore_auth:
- "read:pets"
- token: []
/pet/findByTags:
get:
tags:
Expand Down Expand Up @@ -134,8 +129,7 @@ paths:
"400":
description: Invalid tag value
security:
- petstore_auth:
- "read:pets"
- token: []
deprecated: true
"/pet/{petId}":
get:
Expand Down Expand Up @@ -164,7 +158,7 @@ paths:
"404":
description: Pet not found
security:
- api_key: []
- token: []
post:
tags:
- pet
Expand All @@ -185,9 +179,7 @@ paths:
"405":
description: Invalid input
security:
- petstore_auth:
- "write:pets"
- "read:pets"
- token: []
requestBody:
content:
application/x-www-form-urlencoded:
Expand All @@ -207,11 +199,6 @@ paths:
description: ""
operationId: deletePet
parameters:
- name: api_key
in: header
required: false
schema:
type: string
- name: petId
in: path
description: Pet id to delete
Expand All @@ -225,9 +212,7 @@ paths:
"400":
description: Invalid pet value
security:
- petstore_auth:
- "write:pets"
- "read:pets"
- token: []
"/pet/{petId}/uploadImage":
post:
tags:
Expand All @@ -251,9 +236,7 @@ paths:
schema:
$ref: "#/components/schemas/ApiResponse"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
- token: []
requestBody:
content:
multipart/form-data:
Expand Down Expand Up @@ -285,7 +268,7 @@ paths:
type: integer
format: int32
security:
- api_key: []
- token: []
/store/order:
post:
tags:
Expand Down Expand Up @@ -372,7 +355,7 @@ paths:
"201":
description: successful operation
security:
- api_key: []
- token: []
requestBody:
content:
application/json:
Expand All @@ -391,7 +374,7 @@ paths:
"201":
description: successful operation
security:
- api_key: []
- token: []
requestBody:
$ref: "#/components/requestBodies/UserArray"
/user/createWithList:
Expand All @@ -405,7 +388,7 @@ paths:
"201":
description: successful operation
security:
- api_key: []
- token: []
requestBody:
$ref: "#/components/requestBodies/UserArray"
/user/login:
Expand Down Expand Up @@ -467,7 +450,7 @@ paths:
"204":
description: successful operation
security:
- api_key: []
- token: []
"/user/{username}":
get:
tags:
Expand Down Expand Up @@ -512,7 +495,7 @@ paths:
"404":
description: User not found
security:
- api_key: []
- token: []
requestBody:
content:
application/json:
Expand All @@ -539,7 +522,7 @@ paths:
"404":
description: User not found
security:
- api_key: []
- token: []
externalDocs:
description: Find out more about Swagger
url: "http://swagger.io"
Expand All @@ -562,18 +545,22 @@ components:
description: Pet object that needs to be added to the store
required: true
securitySchemes:
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
scopes:
"write:pets": modify pets in your account
"read:pets": read your pets
# petstore_auth:
# type: oauth2
# flows:
# implicit:
# authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
# scopes:
# "write:pets": modify pets in your account
# "read:pets": read your pets
api_key:
type: apiKey
name: api_key
in: header
token:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Order:
title: Pet Order
Expand Down
4 changes: 4 additions & 0 deletions test/fixture/todo/services/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ delete:
operationId: deleteTodo
tags: [todo]
description: delete a todo item
security:
- token: []
parameters:
- name: todoId
in: path
Expand All @@ -37,6 +39,8 @@ patch:
operationId: updateTodo
tags: [todo]
description: update todo status
security:
- token: []
parameters:
- name: todoId
in: path
Expand Down
2 changes: 2 additions & 0 deletions test/fixture/todo/services/todos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ post:
operationId: createTodo
tags: [todos]
description: create a new todo item
security:
- token: []
requestBody:
description: todo item to be posted
required: true
Expand Down

0 comments on commit 9c79314

Please sign in to comment.