forked from loafle/openapi-generator-original
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "{{appName}}",
|
|
"description": "{{appDescription}}",
|
|
"version": "{{apiVersion}}"
|
|
},
|
|
{{#apiInfo}}
|
|
"produces": ["application/json"],
|
|
"host": "localhost:{{serverPort}}",
|
|
"basePath": "{{contextPath}}",
|
|
"paths": {
|
|
{{#apis}}
|
|
{{#operations}}
|
|
{{#operationsByPath}}
|
|
"{{{path}}}": {
|
|
{{#operation}}
|
|
"{{httpMethod}}": {
|
|
"summary": "{{summary}}",
|
|
"description":"{{notes}}",
|
|
"x-swagger-router-controller": "{{classname}}",
|
|
"tags": ["{{baseName}}"],
|
|
"operationId": "{{operationId}}",{{#hasParams}}
|
|
"parameters": [
|
|
{{#allParams}}{{{jsonSchema}}}{{#hasMore}},{{/hasMore}}
|
|
{{/allParams}}
|
|
],{{/hasParams}}
|
|
"responses": {
|
|
{{#responses}}"{{code}}": {{{jsonSchema}}}
|
|
{{#hasMore}},{{/hasMore}}
|
|
{{/responses}}
|
|
}
|
|
} {{#hasMore}},{{/hasMore}}
|
|
{{/operation}}
|
|
} {{#hasMore}},{{/hasMore}}
|
|
{{/operationsByPath}}
|
|
{{#hasMore}},{{/hasMore}}
|
|
{{/operations}}
|
|
{{/apis}}
|
|
{{/apiInfo}}
|
|
}, "definitions": {
|
|
{{#models}}{{#model}}"{{classVarName}}": {{{modelJson}}}{{#hasMoreModels}},{{/hasMoreModels}}{{/model}}{{/models}}
|
|
}
|
|
}
|