Description
The standalone openapi-generator-angular21 repo has small issues which are fixed the version used in ls1intum/tum-apply, which has accumulated 11 bug fixes and improvements during integration. These need to be backported to keep the standalone generator usable by other projects.
Fixes to backport
- Path template generation — Rewrote
buildPathTemplate to use original OpenAPI paths instead of regex-parsing the parent's encodeParam format, which broke with openapi-generator 7.18.0+
- GET methods in service classes — Removed the
x-is-get filter so services include all HTTP methods, not just mutations
- Model-to-model imports — Added
./ relative path prefix in model.mustache
- API-to-model imports — Switched to
tsImports with correct model filenames instead of imports which resolved to the API tag name
- Array-of-enum types — Wrapped enum types in
Array<> when the property is an array
- Void return types — Added explicit
<void> type parameter to HttpClient calls
- Duplicate HttpHeaders import — Replaced per-operation conditional import with static import
- Const enum objects — Generate runtime
const objects alongside string union types for enum access
- Blob response handling — Added
responseType: 'blob' and observe: 'response' for file download endpoints
- Array query params — Use
URLSearchParams.append() instead of join(',') for correct wire format
- Inline model filenames — Convert underscores to hyphens in
toKebabCase() for consistent filenames
- Model output folder — Use
model/ instead of models/ for output directory
Acceptance Criteria
Description
The standalone
openapi-generator-angular21repo has small issues which are fixed the version used inls1intum/tum-apply, which has accumulated 11 bug fixes and improvements during integration. These need to be backported to keep the standalone generator usable by other projects.Fixes to backport
buildPathTemplateto use original OpenAPI paths instead of regex-parsing the parent'sencodeParamformat, which broke with openapi-generator 7.18.0+x-is-getfilter so services include all HTTP methods, not just mutations./relative path prefix inmodel.mustachetsImportswith correct model filenames instead ofimportswhich resolved to the API tag nameArray<>when the property is an array<void>type parameter toHttpClientcallsconstobjects alongside string union types for enum accessresponseType: 'blob'andobserve: 'response'for file download endpointsURLSearchParams.append()instead ofjoin(',')for correct wire formattoKebabCase()for consistent filenamesmodel/instead ofmodels/for output directoryAcceptance Criteria