debug run showed the code from
to be the culprit:
const service = await parse(v4metadata) // containing a v4 function
// service.functions[x].isBound is of type String, "true"/"false"
// so above linked code in convert() fails in `bindingParameterFromParameters`
// and no functions are included in the swagger spec
const swagger = await convert(
service.entitySets,
{
functions: service.functions
},
service.version
)
if manually converted to the proper Boolean, convert(...) runs w/o an issue:
const service = await parse(v4metadata) // containing a v4 function
service.functions = service.functions.map(singleService => {
let _service = singleService
_service.isBound = singleService.isBound === "true" ? true : false
_service.isComposable = singleService.isComposable === "true" ? true : false
return _service
})
const swagger = await convert(
service.entitySets,
{
functions: service.functions
},
service.version
)
env:
- node v12.16.1
- odata2openapi 1.3.2
debug run showed the code from
odata2openapi/src/convert.ts
Line 404 in bab2438
if manually converted to the proper
Boolean,convert(...)runs w/o an issue:env: