-
-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cef665c
commit 224151c
Showing
6 changed files
with
90 additions
and
43 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
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
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
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 |
---|---|---|
@@ -1,30 +1,47 @@ | ||
openapi: "3.0.0" | ||
openapi: 3.0.0 | ||
|
||
info: | ||
title: Hello World | ||
version: "1.0" | ||
version: 1.0.0 | ||
title: Swagger Petstore | ||
license: | ||
name: MIT | ||
|
||
servers: | ||
- url: /openapi | ||
|
||
paths: | ||
/greeting/{name}: | ||
post: | ||
summary: Generate greeting | ||
description: Generates a greeting message. | ||
operationId: hello.post_greeting | ||
/pets: | ||
get: | ||
operationId: hello.pets | ||
summary: List all pets | ||
responses: | ||
'200': | ||
description: A paged array of pets | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "components.yaml#/components/schemas/Pets" | ||
default: | ||
description: Unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "components.yaml#/components/schemas/Error" | ||
|
||
'/pets/{petId}': | ||
get: | ||
operationId: hello.pet | ||
summary: Info for a specific pet | ||
responses: | ||
'200': | ||
description: greeting response | ||
description: Expected response to a valid request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "components.yaml#/components/schemas/Pet" | ||
default: | ||
description: Unexpected error | ||
content: | ||
text/plain: | ||
application/json: | ||
schema: | ||
type: string | ||
example: "hello dave!" | ||
parameters: | ||
- name: name | ||
in: path | ||
description: Name of the person to greet. | ||
required: true | ||
schema: | ||
type: string | ||
example: "dave" | ||
$ref: "components.yaml#/components/schemas/Error" |
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 |
---|---|---|
@@ -1,25 +1,36 @@ | ||
swagger: "2.0" | ||
|
||
info: | ||
title: Hello World | ||
title: "{{title}}" | ||
version: "1.0" | ||
|
||
basePath: /swagger | ||
|
||
paths: | ||
/greeting/{name}: | ||
post: | ||
summary: Generate greeting | ||
description: Generates a greeting message. | ||
operationId: hello.post_greeting | ||
/pets: | ||
get: | ||
summary: List all pets | ||
responses: | ||
'200': | ||
description: greeting response | ||
description: A paged array of pets | ||
schema: | ||
type: array | ||
items: | ||
$ref: 'definitions.yaml#/definitions/Pets' | ||
default: | ||
description: Unexpected Error | ||
schema: | ||
$ref: 'definitions.yaml#/definitions/Error' | ||
|
||
'/pets/{id}': | ||
get: | ||
summary: Info for a specific pet | ||
responses: | ||
'200': | ||
description: Expected response to a valid request | ||
schema: | ||
$ref: 'definitions.yaml#/definitions/Pet' | ||
default: | ||
description: Unexpected Error | ||
schema: | ||
type: string | ||
example: "hello dave!" | ||
parameters: | ||
- name: name | ||
in: path | ||
description: Name of the person to greet. | ||
required: true | ||
type: string | ||
$ref: 'definitions.yaml#/definitions/Error' |
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