You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lb4 openapi command fails to generate working code in case the specification provided is generated by loopback itself. This shouldn't be the case as the specification is generated by LoopBack and the framework uses that same spec.
To reproduce this, generate specs from any lb4-based project. Then use that same specification to generate openapi artifacts with lb4 openapi. The resulting app creates buggy code.
The reproduction app is built based on openapi specs of this application.
Logs
src/models/index.ts:2:1 - error TS2308: Module './account-with-relations.model' has already exported a member named 'AccountWithRelations'. Consider explicitly re-exporting to resolve the ambiguity.
2 export* from './account.model';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/models/index.ts:6:1 - error TS2308: Module './customer-with-relations.model' has already exported a member named 'CustomerWithRelations'. Consider explicitly re-exporting to resolve the ambiguity.
6 export* from './customer.model';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Additional information
I tried removing duplicate entries which have been causing the problems. The resulting code still was not working and causing another issue. The request passed to swagger-client had filter=undefined in the URL which was making swagger-client fail to fetch any data.
Describe the bug
The
lb4 openapi
command fails to generate working code in case the specification provided is generated by loopback itself. This shouldn't be the case as the specification is generated by LoopBack and the framework uses that same spec.To reproduce this, generate specs from any lb4-based project. Then use that same specification to generate openapi artifacts with lb4
openapi
. The resulting app creates buggy code.The reproduction app is built based on openapi specs of this application.
Logs
Additional information
I tried removing duplicate entries which have been causing the problems. The resulting code still was not working and causing another issue. The request passed to swagger-client had
filter=undefined
in the URL which was making swagger-client fail to fetch any data.Reproduction
https://github.com/aaqilniz/lb4-ex-openapi
The text was updated successfully, but these errors were encountered: