-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Steps to reproduce
Using the open api generator, generate a controller that does not use any request bodies or does not pass any parameters.
This can be problematic depending on the compiler options, for example having unused parameters. The same could be said for an empty parameterless constructor.
Current Behavior
The param and requestBody decorators are imported in the controller file. An empty constructor is generated.
Expected Behavior
The param and requestBody decorators should not be imported. The constructor should be omitted.
Link to reproduction sandbox
The imports are made unconditionally.
Additional information
win32 x64 12.5.0
├─ @loopback/boot@1.4.4
├─ @loopback/context@1.20.2
├─ @loopback/core@1.8.5
├─ @loopback/http-server@1.4.4
├─ @loopback/metadata@1.2.5
├─ @loopback/openapi-v3@1.7.0
├─ @loopback/repository-json-schema@1.8.0
├─ @loopback/repository@1.8.2
├─ @loopback/rest-explorer@1.2.5
├─ @loopback/rest@1.16.3
├─ @loopback/service-proxy@1.2.5
├─ loopback-connector@4.8.0
├─ loopback-datasource-juggler@4.8.2
Related Issues
N/A