diff --git a/api/default/health-path/health-path.json b/api/default/health-path/health-path.json new file mode 100644 index 0000000..9b36c59 --- /dev/null +++ b/api/default/health-path/health-path.json @@ -0,0 +1,120 @@ +{ + "summary": "Health service", + "description": "This service end point is to discover the health of the\nservice. The information provides an overall health\nand also health individual upstream dependencies.\n\n# Security\n\nThe service is secured to stop abuse.", + "get": { + "tags": [ + "Draft" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/health-model" + }, + "examples": { + "Simple-health": { + "value": { + "status": "PASS", + "version": "some text", + "notes": [ + "some text", + "some text" + ], + "output": "some text", + "description": "some text", + "checks": {}, + "release_id": "some text", + "service_id": "some text", + "links": [ + { + "href": "some text", + "rel": "some text", + "operation": "PUT", + "caption": "some text", + "media_type": "some text" + }, + { + "href": "some text", + "rel": "some text", + "operation": "POST", + "caption": "some text", + "media_type": "some text" + } + ] + } + } + } + } + }, + "description": "The service is healthy" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error-model" + }, + "examples": { + "health500error": { + "value": { + "status": "some text", + "message": "some text", + "resolution": "some text", + "technical": "some text" + } + } + } + } + }, + "description": "Internal error with service, with minimal\ninformation available" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/health-model" + }, + "examples": { + "ealth503error": { + "value": { + "status": "FAIL", + "version": "some text", + "notes": [ + "some text", + "some text" + ], + "output": "some text", + "description": "some text", + "checks": {}, + "release_id": "some text", + "service_id": "some text", + "links": [ + { + "href": "some text", + "rel": "some text", + "operation": "GET", + "caption": "some text", + "media_type": "some text" + }, + { + "href": "some text", + "rel": "some text", + "operation": "DELETE", + "caption": "some text", + "media_type": "some text" + } + ] + } + } + } + } + }, + "description": "The service is unavailable" + } + }, + "operationId": "health-get", + "summary": "Retrieve the health of the Investment Product service", + "description": "Gets the health of the service" + } +} \ No newline at end of file diff --git a/api/default/health.json b/api/default/health.json new file mode 100644 index 0000000..a0dec1a --- /dev/null +++ b/api/default/health.json @@ -0,0 +1,27 @@ +{ + "name": "health-path", + "guide": "{{.SelfFolder}}/health-path.md", + "description": "Health service path", + "templates": [ + { + "engine": "", + "folder": "{{.SelfFolder}}/{{.TemplateName}}", + "file_name": "health-path.json", + "output_folder": "", + "output_name": "", + "section": "", + "model": { + "activity": { + "category": "OTHER" + } + } + } + ], + "variables": [ + {"label": "OpenAPI","source" :"","default":"","name":"openapi.type","type":"string","value":"path"}, + {"label": "OpenAPI","source" :"","default":"","name":"name","type":"string","value":"/healthcheck"}, + {"label": "OpenAPI","source" :"","default":"","name":"path","type":"string","value":"/healthcheck"}, + {"label": "OpenAPI","source" :"","default":"","name":"value","type":"string","value":"*CONTENT"}, + {"label": "OpenAPI","source" :"","default":"","name":"tag","type":"string","value":"ManageService"} + ] +} diff --git a/api/default/resp-header.json b/api/default/resp-header.json new file mode 100644 index 0000000..7d73d2a --- /dev/null +++ b/api/default/resp-header.json @@ -0,0 +1,27 @@ +{ + "name": "resp-header", + "guide": "{{.SelfFolder}}/resp-header.md", + "description": "Response header items for all paths", + "templates": [ + { + "engine": "", + "folder": "{{.SelfFolder}}/{{.TemplateName}", + "file_name": "resp-header.tmpl", + "output_folder": "", + "output_name": "", + "section": "", + "model": { + "activity": { + "category": "OTHER" + } + } + } + ], + "variables": [ + {"label": "OpenAPI","source" :"","default":"","name":"openapi.type","type":"string","value":"path-responses-header"}, + {"label": "OpenAPI","source" :"","default":"","name":"name","type":"string","value":"^/.*$"}, + {"label": "OpenAPI","source" :"","default":"","name":"method","type":"string","value":"GET, POST, DELETE, PUT, PATCH"}, + {"label": "OpenAPI","source" :"","default":"","name":"httpCode","type":"string","value":"200,201,204,400,401,404,500,503"}, + {"label": "OpenAPI","source" :"","default":"","name":"value","type":"string","value":"*CONTENT"} + ] +}