Create diagram for Open API spec
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
"genres": "cds serve test/genres.cds",
|
"genres": "cds serve test/genres.cds",
|
||||||
"start": "cds run",
|
"start": "cds run",
|
||||||
"watch": "cds watch",
|
"watch": "cds watch",
|
||||||
"to-openapi": "cds compile srv --to openapi -s CatalogService -o srv && mv srv/srv.openapi3.json srv/CatalogService.openapi3.json"
|
"to-openapi": "cds compile srv --to openapi -s CatalogService -o srv --openapi:diagram && mv srv/srv.openapi3.json srv/CatalogService.openapi3.json"
|
||||||
},
|
},
|
||||||
"cds": {
|
"cds": {
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ async function toOpenApiDoc(service, host, cache) {
|
|||||||
DEBUG && DEBUG ('Compiling Open API spec for', service.name)
|
DEBUG && DEBUG ('Compiling Open API spec for', service.name)
|
||||||
cache[service.name] = cds.compile.to.openapi (service.model, {
|
cache[service.name] = cds.compile.to.openapi (service.model, {
|
||||||
service: service.name,
|
service: service.name,
|
||||||
'openapi:url': service.path
|
'openapi:url': service.path,
|
||||||
|
'openapi:diagram': true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user