sourcefuse / loopback4-starter

Loopback 4 starter application. Multi-tenant architecture supported. Authentication, Authorization, Soft deletes, environment vars, Audit logs, included.
MIT License
158 stars 59 forks source link

API Explorer: Unable to render this definition #76

Closed arnaud16571542 closed 3 years ago

arnaud16571542 commented 3 years ago

Hello, This is not a bug from the package, but because of my mistake. I was not able to find any documentation about this bug or behavious, and i spent 1 or 2 hours to correct this problem. I thought here could be a good place to record this solution. If not, I apologize and you can delete it (or resolve it :)). See this bug report as my tiny contribution to thank and help this project.

Describe the bug Install loopback4-starter, execute all the installation procedure. Go to the http://[::1]:3001/explorer/ and get the error "Unable to render this definition"

Unable to render this definition
The provided definition does not specify a valid version field.
Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).

To Reproduce Edit packages.json. Set the author value => "author": "(C) 2021 MySelf Corporate". Rebuild & restart Go to http://[::1]:3001/explorer/ and get the error "Unable to render this definition"

Expected behavior The working explorer, OR an explicit error.

Screenshots n/a

Additional context In my case, the field /info/contact/url was not correct. This url is taken from packages.json field "author". Check the documentation : https://docs.npmjs.com/cli/v7/configuring-npm/package-json

akshatdubeysf commented 3 years ago

Hi,

Thanks for your input, I am closing this issue, it will still be visible to the people looking for a solution to a problem like this.