Bug Report Checklist
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
Bug Report Checklist
Description
throwIfRequiredandCOLLECTION_FORMATSare imported unconditionally at the top of theapis.mustachefile. However, depending on the contents of the spec, they may not be used and are marked as unused imports.throwIfRequiredonly needs importing if there are required params.COLLECTION_FORMATSonly needs importing ifisListContainerorisCollectionFormatMultiis 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 ./outSteps to reproduce
N/A
Related issues/PRs
N/A
Suggest a fix