Created
January 31, 2022 22:44
-
-
Save vtolstov/a29bada59d38573535a1f19a5489f5dc to your computer and use it in GitHub Desktop.
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
{ | |
"openapi": "3.0.3", | |
"info": { | |
"title": "APIGW spec", | |
"description": "apigw service", | |
"version": "0.0.1" | |
}, | |
"paths": { | |
"path": [ | |
{ | |
"name": "/api/v1/services", | |
"value": { | |
"get": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceList", | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceListRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"post": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceCreate", | |
"requestBody": { | |
"requestBody": { | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceCreateReq" | |
} | |
} | |
} | |
} | |
] | |
}, | |
"required": true | |
} | |
}, | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceCreateRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "/api/v1/services/{serviceId}", | |
"value": { | |
"get": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceLookup", | |
"parameters": [ | |
{ | |
"parameter": { | |
"name": "serviceId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceLookupRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"put": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceUpdate", | |
"parameters": [ | |
{ | |
"parameter": { | |
"name": "serviceId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"requestBody": { | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceUpdateReq" | |
} | |
} | |
} | |
} | |
] | |
}, | |
"required": true | |
} | |
}, | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceUpdateRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceList", | |
"parameters": [ | |
{ | |
"parameter": { | |
"name": "serviceId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceDeleteRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "/api/v1/services/{serviceId}/operations", | |
"value": { | |
"get": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceOperationList", | |
"parameters": [ | |
{ | |
"parameter": { | |
"name": "serviceId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceOperationListRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "/api/v1/services/{serviceId}/operations/{operationId}/{action}", | |
"value": { | |
"post": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceOperationUpdate", | |
"parameters": [ | |
{ | |
"parameter": { | |
"name": "serviceId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
{ | |
"parameter": { | |
"name": "operationId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
{ | |
"parameter": { | |
"name": "action", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"requestBody": { | |
"requestBody": { | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceOperationUpdateReq" | |
} | |
} | |
} | |
} | |
] | |
}, | |
"required": true | |
} | |
}, | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/json", | |
"value": { | |
"schema": { | |
"reference": { | |
"Ref": "#/components/schemas/ServiceOperationUpdateRsp" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "/api/v1/services/{serviceId}/swagger", | |
"value": { | |
"get": { | |
"tags": [ | |
"ApigwService" | |
], | |
"operationId": "ApigwService.ServiceSwagger", | |
"parameters": [ | |
{ | |
"parameter": { | |
"name": "serviceId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"responseOrReference": [ | |
{ | |
"name": "200", | |
"value": { | |
"response": { | |
"description": "OK", | |
"content": { | |
"additionalProperties": [ | |
{ | |
"name": "application/octet-stream", | |
"value": {} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
}, | |
"components": { | |
"schemas": { | |
"additionalProperties": [ | |
{ | |
"name": "Frame", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "data", | |
"value": { | |
"schema": { | |
"type": "string", | |
"format": "bytes" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "Operation", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "name", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "method", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "path", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "id", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "Service", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "name", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "version", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "description", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "prefix", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "id", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "operations", | |
"value": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"schemaOrReference": [ | |
{ | |
"reference": { | |
"Ref": "#/components/schemas/Operation" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceCreateReq", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "prefix", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "swagger", | |
"value": { | |
"reference": { | |
"Ref": "#/components/schemas/Frame" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceCreateRsp", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "service", | |
"value": { | |
"reference": { | |
"Ref": "#/components/schemas/Service" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceDeleteRsp", | |
"value": { | |
"schema": { | |
"properties": {} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceListRsp", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "services", | |
"value": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"schemaOrReference": [ | |
{ | |
"reference": { | |
"Ref": "#/components/schemas/Service" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceLookupRsp", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "service", | |
"value": { | |
"reference": { | |
"Ref": "#/components/schemas/Service" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceOperationListRsp", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "operations", | |
"value": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"schemaOrReference": [ | |
{ | |
"reference": { | |
"Ref": "#/components/schemas/Operation" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceOperationUpdateReq", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "serviceId", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "operationId", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "action", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceOperationUpdateRsp", | |
"value": { | |
"schema": { | |
"properties": {} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceUpdateReq", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "serviceId", | |
"value": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"name": "swagger", | |
"value": { | |
"reference": { | |
"Ref": "#/components/schemas/Frame" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"name": "ServiceUpdateRsp", | |
"value": { | |
"schema": { | |
"properties": { | |
"additionalProperties": [ | |
{ | |
"name": "service", | |
"value": { | |
"reference": { | |
"Ref": "#/components/schemas/Service" | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
}, | |
"tags": [ | |
{ | |
"name": "ApigwService" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment