-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
Description
throwIfRequired and COLLECTION_FORMATS are imported unconditionally at the top of the apis.mustache file. However, depending on the contents of the spec, they may not be used and are marked as unused imports.
throwIfRequired only needs importing if there are required params.
COLLECTION_FORMATS only needs importing if isListContainer or isCollectionFormatMulti is set.
This can be problematic if compiler options are set to not allow unused vars.
openapi-generator version
4.0.3. No regression.
OpenAPI declaration file content or url
N/A
Command line used for generation
java -jar openapi-generator-cli.jar generate -i spec.yaml -g typescript-rxjs -o ./out
Steps to reproduce
N/A
Related issues/PRs
N/A
Suggest a fix
Reactions are currently unavailable