-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Theo Truong <theotr@amazon.com>
- Loading branch information
Showing
17 changed files
with
1,655 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
|
||
type: object | ||
properties: | ||
$schema: | ||
type: string | ||
skipped: | ||
type: boolean | ||
description: If true, the story will be skipped. | ||
default: false | ||
description: | ||
type: string | ||
prologues: | ||
type: array | ||
items: | ||
$ref: '#/definitions/SupplementalChapter' | ||
epilogues: | ||
type: array | ||
items: | ||
$ref: '#/definitions/SupplementalChapter' | ||
chapters: | ||
type: array | ||
items: | ||
$ref: '#/definitions/Chapter' | ||
minItems: 1 | ||
required: [ description, chapters, prologues, epilogues] | ||
additionalProperties: false | ||
|
||
definitions: | ||
Chapter: | ||
type: object | ||
allOf: | ||
- $ref: '#/definitions/ChapterRequest' | ||
- properties: | ||
synopsis: | ||
type: string | ||
description: A brief description of the chapter. | ||
response: | ||
$ref: '#/definitions/ExpectedResponse' | ||
required: [ synopsis ] | ||
additionalProperties: false | ||
|
||
ReadChapter: | ||
allOf: | ||
- $ref: '#/definitions/Chapter' | ||
- type: object | ||
properties: | ||
response: | ||
$ref: '#/definitions/ActualResponse' | ||
required: [ response ] | ||
additionalProperties: false | ||
|
||
SupplementalChapter: | ||
allOf: | ||
- $ref: '#/definitions/ChapterRequest' | ||
- type: object | ||
properties: | ||
ignore_errors: | ||
description: If true, treat all non-2XX responses as successful. | ||
type: boolean | ||
default: false | ||
|
||
ChapterRequest: | ||
type: object | ||
properties: | ||
path: | ||
type: string | ||
method: | ||
type: string | ||
enum: [ GET, PUT, POST, DELETE, PATCH, HEAD, OPTIONS ] | ||
parameters: | ||
type: object | ||
additionalProperties: | ||
$ref: '#/definitions/Parameter' | ||
requestBody: | ||
$ref: '#/definitions/RequestBody' | ||
required: [ path, method ] | ||
additionalProperties: false | ||
|
||
|
||
RequestBody: | ||
type: object | ||
properties: | ||
content_type: | ||
type: string | ||
payload: | ||
$ref: '#/definitions/Payload' | ||
required: [ content_type, payload ] | ||
additionalProperties: false | ||
|
||
ExpectedResponse: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
description: The expected HTTP status code. Default to 200. | ||
default: 200 | ||
content_type: | ||
type: string | ||
payload: | ||
$ref: '#/definitions/Payload' | ||
required: [ status ] | ||
additionalProperties: false | ||
|
||
ActualResponse: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
content_type: | ||
type: string | ||
payload: | ||
$ref: '#/definitions/Payload' | ||
message: | ||
type: string | ||
description: Error message for non 2XX responses. | ||
required: [ status, content_type, payload ] | ||
additionalProperties: false | ||
|
||
Payload: | ||
anyOf: | ||
- type: object | ||
- type: array | ||
- type: string | ||
- type: number | ||
- type: boolean | ||
|
||
Parameter: | ||
anyOf: | ||
- type: array | ||
items: | ||
oneOf: | ||
- type: string | ||
- type: number | ||
- type: boolean | ||
- type: string | ||
- type: number | ||
- type: boolean |
Oops, something went wrong.