This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass at outputting example response bodies
- Loading branch information
Dom Harrington
committed
Oct 19, 2017
1 parent
b049885
commit 259d050
Showing
6 changed files
with
214 additions
and
37 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
packages/api-explorer-ui/__tests__/fixtures/example-results/circular-oas.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,66 @@ | ||
{ | ||
"openapi": "3.0.0-rc2", | ||
"servers": [ | ||
{ | ||
"url": "http://example.com" | ||
} | ||
], | ||
"info": { | ||
"title": "example results", | ||
"version": "1.0" | ||
}, | ||
"paths": { | ||
"/results": { | ||
"get": { | ||
"description": "", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"content": { | ||
"application/json": { | ||
"examples": { | ||
"response": { | ||
"value": { | ||
"user": { | ||
"email": "test@example.com", | ||
"name": "Test user name" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Validation failed", | ||
"content": { | ||
"application/json": { | ||
"examples": { | ||
"response": { | ||
"value": { | ||
"email": "invalid email", | ||
"name": "name already taken" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"summary": "Update Password" | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": {}, | ||
"responses": {}, | ||
"parameters": {}, | ||
"examples": {}, | ||
"requestBodies": {}, | ||
"securitySchemes": {}, | ||
"headers": {} | ||
}, | ||
"x-explorer-enabled": true, | ||
"x-samples-enabled": true, | ||
"x-samples-languages": ["curl", "node", "ruby", "javascript", "python"] | ||
} |
66 changes: 66 additions & 0 deletions
66
packages/api-explorer-ui/__tests__/fixtures/example-results/oas.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,66 @@ | ||
{ | ||
"openapi": "3.0.0-rc2", | ||
"servers": [ | ||
{ | ||
"url": "http://example.com" | ||
} | ||
], | ||
"info": { | ||
"title": "example results", | ||
"version": "1.0" | ||
}, | ||
"paths": { | ||
"/results": { | ||
"get": { | ||
"description": "", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"content": { | ||
"application/json": { | ||
"examples": { | ||
"response": { | ||
"value": { | ||
"user": { | ||
"email": "test@example.com", | ||
"name": "Test user name" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Validation failed", | ||
"content": { | ||
"application/json": { | ||
"examples": { | ||
"response": { | ||
"value": { | ||
"email": "invalid email", | ||
"name": "name already taken" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"summary": "Update Password" | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": {}, | ||
"responses": {}, | ||
"parameters": {}, | ||
"examples": {}, | ||
"requestBodies": {}, | ||
"securitySchemes": {}, | ||
"headers": {} | ||
}, | ||
"x-explorer-enabled": true, | ||
"x-samples-enabled": true, | ||
"x-samples-languages": ["curl", "node", "ruby", "javascript", "python"] | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/api-explorer-ui/__tests__/fixtures/example-results/swagger.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,38 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "example results", | ||
"version": "1.0" | ||
}, | ||
"host": "example.com", | ||
"paths": { | ||
"/results": { | ||
"get": { | ||
"description": "", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"examples": { | ||
"application/json": { | ||
"user": { | ||
"email": "test@example.com", | ||
"name": "Test user name" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Validation failed", | ||
"examples": { | ||
"application/json": { | ||
"email": "invalid email", | ||
"name": "name already taken" | ||
} | ||
} | ||
} | ||
}, | ||
"summary": "Update Password", | ||
} | ||
} | ||
} | ||
} |
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