-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
35 changed files
with
1,384 additions
and
1,058 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 |
---|---|---|
|
@@ -129,4 +129,5 @@ dist | |
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
.DS_Store | ||
.DS_Store | ||
openapi.html |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
services: | ||
openapi-swagger: | ||
container_name: openapi-swagger | ||
image: swaggerapi/swagger-ui | ||
volumes: | ||
- ./openapi.json:/usr/share/nginx/html/openapi.json | ||
environment: | ||
API_URL: openapi.json | ||
ports: | ||
- 9000:8080 | ||
openapi-mock: | ||
container_name: openapi-mock | ||
image: stoplight/prism:4 | ||
command: mock -h 0.0.0.0 /openapi.json | ||
ports: | ||
- "8000:4010" | ||
volumes: | ||
- ./openapi.json:/openapi.json:ro |
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,110 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "Sample API", | ||
"description": "This is a sample API definition", | ||
"version": "1.0.0" | ||
}, | ||
"servers": [{ "url": "https://api.example.com/api/v1" }], | ||
"paths": { | ||
"/companies": { | ||
"get": { | ||
"summary": "企業情報を全件取得する", | ||
"responses": { | ||
"200": { | ||
"description": "", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/Companies" | ||
}, | ||
"examples": { | ||
"dummy": { | ||
"value": [ | ||
{ "id": 1, "name": "Amazon合同会社", "email": "[email protected]" }, | ||
{ "id": 2, "name": "SONY株式会社", "email": "[email protected]" }, | ||
{ "id": 3, "name": "Facebook株式会社", "email": "[email protected]" }, | ||
{ "id": 4, "name": "dummy04株式会社", "email": "[email protected]" }, | ||
{ "id": 5, "name": "dummy05株式会社", "email": "[email protected]" }, | ||
{ "id": 6, "name": "dummy06株式会社", "email": "[email protected]" }, | ||
{ "id": 7, "name": "dummy07株式会社", "email": "[email protected]" }, | ||
{ "id": 8, "name": "dummy08株式会社", "email": "[email protected]" }, | ||
{ "id": 9, "name": "dummy09株式会社", "email": "[email protected]" }, | ||
{ "id": 10, "name": "dummy10株式会社", "email": "[email protected]" }, | ||
{ "id": 11, "name": "dummy11株式会社", "email": "[email protected]" }, | ||
{ "id": 12, "name": "dummy12株式会社", "email": "[email protected]" }, | ||
{ "id": 13, "name": "dummy13株式会社", "email": "[email protected]" }, | ||
{ "id": 14, "name": "dummy14株式会社", "email": "[email protected]" }, | ||
{ "id": 15, "name": "dummy15株式会社", "email": "[email protected]" }, | ||
{ "id": 16, "name": "dummy16株式会社", "email": "[email protected]" }, | ||
{ "id": 17, "name": "dummy17株式会社", "email": "[email protected]" }, | ||
{ "id": 18, "name": "dummy18株式会社", "email": "[email protected]" }, | ||
{ "id": 19, "name": "dummy19株式会社", "email": "[email protected]" }, | ||
{ "id": 20, "name": "dummy20株式会社", "email": "[email protected]" }, | ||
{ "id": 21, "name": "dummy21株式会社", "email": "[email protected]" }, | ||
{ "id": 22, "name": "dummy22株式会社", "email": "[email protected]" }, | ||
{ "id": 23, "name": "dummy23株式会社", "email": "[email protected]" } | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"$ref": "#/components/responses/NotFoundError" | ||
}, | ||
"500": { | ||
"$ref": "#/components/responses/InternalServerError" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"Company": { | ||
"type": "object", | ||
"required": ["id", "name", "email"], | ||
"properties": { | ||
"id": { "type": "string", "title": "ID" }, | ||
"name": { "type": "string", "title": "企業名" }, | ||
"email": { "type": "string", "title": "メールアドレス" } | ||
} | ||
}, | ||
"Companies": { | ||
"type": "array", | ||
"items": { "$ref": "#/components/schemas/Company" } | ||
} | ||
}, | ||
"responses": { | ||
"NotFoundError": { | ||
"description": "", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"required": ["error"], | ||
"properties": { | ||
"error": { "type": "string", "nullable": false } | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"InternalServerError": { | ||
"description": "", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"required": ["error"], | ||
"properties": { | ||
"error": { "type": "string", "nullable": false } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.