Adding path templates

main
Tom Peltonen 2025-07-05 09:56:06 +10:00
parent b9e101126a
commit ff420d4b7e
3 changed files with 174 additions and 0 deletions

View File

@ -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"
}
}

View File

@ -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"}
]
}

View File

@ -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"}
]
}