nitrictech / legacy-cli

CLI for the Nitric Framework
Apache License 2.0
6 stars 3 forks source link

Open API yaml without X-Nitric-Target #167

Closed raksiv closed 2 years ago

raksiv commented 3 years ago

Nitric APIs

apis: example: api.yaml

If the api.yaml file contains an operation which does not have -

 x-nitric-target:
    name: *****
    type: function  

It will throw the following error - TypeError: Cannot read property 'type' of undefined

The error has no context as to where in nitric.yaml or api.yaml that this is occurring. Ideally, should throw a warning suggesting that the operation will not map to a nitric service.