added interactive generation

master
Niclas Thobaben 2021-07-07 13:55:50 +02:00
parent 2d0708493f
commit 6bb0f6ad05
2 changed files with 46 additions and 0 deletions

View File

@ -34,6 +34,7 @@ module.exports.start = function(schema, cb) {
if(!line && currentQuestion.default) {
line = currentQuestion.default(results)
}
line = line.length && line || undefined
results[currentQuestion.name] = line;
idx++;
if(idx >= schema.length) {

45
test.json 100644
View File

@ -0,0 +1,45 @@
{
"name": "test",
"description": "Hadasd.",
"info": {
"contact": {
"name": "Niclas Thobaben",
"email": "info@nclazz.de",
"url": "nclazz.de"
}
},
"imports": [],
"headers": [],
"enums": {},
"interfaces": {},
"models": {
"healthcheck": {
"description": "A simple response indicating the health status of a service.",
"fields": [
{
"name": "status",
"type": "string"
}
]
}
},
"unions": {},
"resources": {
"healthcheck": {
"path": "/_internal_/healthcheck",
"operations": {
"method": "GET",
"path": "/healthcheck",
"description": "Simple healthcheck endpoint to test the status of the service.",
"responses": {
"200": {
"type": "healthcheck",
"description": "Get the current health status of the service."
}
}
}
}
},
"attributes": {},
"annotations": {}
}