Added templates for API generate

main
Tom Peltonen 2025-07-02 23:28:45 +10:00
parent 8c52a7ccf4
commit 5dc224e881
3 changed files with 40 additions and 0 deletions

View File

@ -16,5 +16,8 @@
}
}
}
],
"variables": [
{"label": "OpenAPI","source" :"","default":"","name":"name","type":"string","value":"error-model"}
]
}

View File

@ -0,0 +1,27 @@
{
"name": "error-path",
"guide": "{{.SelfFolder}}/error-path.md",
"description": "Default error response",
"templates": [
{
"engine": "",
"folder": "{{.SelfFolder}}/{{.TemplateName}}/definitions",
"file_name": "error-path.tmpl",
"output_folder": "",
"output_name": "",
"section": "",
"model": {
"activity": {
"category": "OTHER"
}
}
}
],
"variables": [
{"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":"500,503"},
{"label": "OpenAPI","source" :"","default":"","name":"ref","type":"string","value":""},
{"label": "OpenAPI","source" :"","default":"","name":"value","type":"string","value":"*CONTENT"}
]
}

View File

@ -0,0 +1,10 @@
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error-model"
}
}
},
"description": "An internal server has occurred.\n\nIt is unlikely that a repeated attempt to access\nthe path service will be successful without\nchange / resolution of the issue at the server"
}