Skip to content

Commit 10ced20

Browse files
kruscheclaude
andcommitted
Development: Adopt openapi-generator-angular22 1.0.0 (incl. generator PR #5)
Switch the OpenAPI client generator from de.tum.cit.aet:openapi-generator-angular21:1.1.0 to openapi-generator-angular22:1.0.0 (renamed for the Angular 22 line; incorporates the generator's PR #5 improvements) and regenerate the committed Angular client. Generator changes surfaced in the regenerated client + the required Artemis adaptations: - Model files now live in `openapi/model/` (singular, honoring modelPackage) instead of the previous `openapi/models/`. Codemod: rewrite `app/openapi/models/` -> `app/openapi/model/` across 53 app/spec files. - File-download endpoints now return `Observable<HttpResponse<Blob>>` (was `Observable<Blob>`); unwrap `response.body` in the tutorial-groups CSV export consumer + its spec. - Enums additionally emit a runtime `const` object alongside the existing string-literal union type (backward compatible), and array query params serialize as repeated params (Spring accepts both). Verified locally: production build 0 errors; full Vitest suite 15,869/15,869 pass. Note: openapi-generator-angular22:1.0.0 is not yet on Maven Central (only publishToMavenLocal); CI never runs openApiGenerate (committed client), so this does not affect CI. Publishing to Maven Central (needs Sonatype creds) is a follow-up for team-wide regeneration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6d2217c commit 10ced20

146 files changed

Lines changed: 577 additions & 382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
force "com.github.jknack:handlebars:4.5.3"
1010
}
1111
}
12-
// The custom OpenAPI generator (generatorName "angular21", https://github.com/ls1intum/openapi-generator-angular21)
12+
// The custom OpenAPI generator (generatorName "angular22", https://github.com/ls1intum/openapi-generator-angular22)
1313
// is only needed when regenerating the Angular client locally via `./gradlew openApiGenerate`. The
1414
// generated client is committed, so CI never regenerates it and must not try to resolve this
1515
// artifact. The generator + Maven Local are therefore added to the buildscript classpath solely for
@@ -29,7 +29,7 @@ buildscript {
2929
mavenCentral()
3030
}
3131
dependencies {
32-
classpath "de.tum.cit.aet:openapi-generator-angular21:1.1.0"
32+
classpath "de.tum.cit.aet:openapi-generator-angular22:1.0.0"
3333
}
3434
}
3535
dependencies {

gradle/openapi.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@
6767
// 5. Post-process the generated files to remove leading underscores and numeric suffixes from method names
6868
// 6. Remove unused imports from the generated TypeScript files to satisfy our tsconfig.
6969

70-
// The Angular client is generated by our custom de.tum.cit.aet:openapi-generator-angular21:1.1.0
71-
// generator (generatorName "angular21"): standalone, inject()-based services (no constructor
70+
// The Angular client is generated by our custom de.tum.cit.aet:openapi-generator-angular22:1.0.0
71+
// generator (generatorName "angular22"): standalone, inject()-based services (no constructor
7272
// injection — required for the AnalogJS fastCompile test runner under Angular 22) and
7373
// signal/readonly-aware models. The generator is added to the buildscript classpath (only for the
7474
// openApiGenerate task) in the root build.gradle, which also documents how to obtain it (Maven
7575
// Central — no auth — or build-from-source via publishToMavenLocal). The generated client is
7676
// committed, so CI never runs openApiGenerate.
7777
openApiGenerate {
78-
generatorName = "angular21"
78+
generatorName = "angular22"
7979
inputSpec.set(file("${rootDir}/openapi/openapi.yaml").toURI().toString())
8080
outputDir = "${rootDir}/src/main/webapp/app/openapi"
8181
apiPackage = "api"

src/main/webapp/app/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, computed, signal, viewChild } from '@angular/core';
2-
import { CalendarEventTypeEnum } from 'app/openapi/models/calendar-event';
2+
import { CalendarEventTypeEnum } from 'app/openapi/model/calendar-event';
33
import { Popover, PopoverModule } from 'primeng/popover';
44
import { IconProp } from '@fortawesome/fontawesome-svg-core';
55
import { TranslateDirective } from 'app/foundation/language/translate.directive';

src/main/webapp/app/calendar/shared/entities/calendar-event.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Dayjs } from 'dayjs/esm';
2-
import { CalendarEventTypeEnum } from 'app/openapi/models/calendar-event';
2+
import { CalendarEventTypeEnum } from 'app/openapi/model/calendar-event';
33
import { generateUuid } from 'app/foundation/util/crypto.utils';
44

55
export class IdentifiableCalendarEvent {

src/main/webapp/app/calendar/shared/service/calendar.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { AccountService } from 'app/core/auth/account.service';
1212
import { MockAccountService } from 'test/helpers/mocks/service/mock-account.service';
1313
import { User } from 'app/account/user/user.model';
1414
import { CalendarApi } from 'app/openapi/api/calendar-api';
15-
import { CalendarEventTypeEnum } from 'app/openapi/models/calendar-event';
15+
import { CalendarEventTypeEnum } from 'app/openapi/model/calendar-event';
1616
import { HttpErrorResponse } from '@angular/common/http';
1717

1818
describe('CalendarService', () => {

src/main/webapp/app/calendar/shared/service/calendar.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AlertService } from 'app/foundation/service/alert.service';
77
import { getCurrentLocaleSignal } from 'app/foundation/util/global.utils';
88
import { AccountService } from 'app/core/auth/account.service';
99
import { CalendarApi } from 'app/openapi/api/calendar-api';
10-
import { CalendarEvent } from 'app/openapi/models/calendar-event';
10+
import { CalendarEvent } from 'app/openapi/model/calendar-event';
1111
import { IdentifiableCalendarEvent } from 'app/calendar/shared/entities/calendar-event.model';
1212

1313
@Injectable({

src/main/webapp/app/calendar/shared/util/calendar-util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IconProp } from '@fortawesome/fontawesome-svg-core';
22
import { faChalkboardUser, faCheckDouble, faDiagramProject, faFileArrowUp, faFont, faGraduationCap, faKeyboard, faPersonChalkboard } from '@fortawesome/free-solid-svg-icons';
3-
import { CalendarEventTypeEnum } from 'app/openapi/models/calendar-event';
3+
import { CalendarEventTypeEnum } from 'app/openapi/model/calendar-event';
44

55
const eventTypeIconMap: Record<CalendarEventTypeEnum, IconProp> = {
66
['LECTURE']: faChalkboardUser,

src/main/webapp/app/core/navbar/global-search/components/modal/global-search-modal.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ArtemisTranslatePipe } from 'app/foundation/pipes/artemis-translate.pip
1515
import { MockComponent, MockPipe } from 'ng-mocks';
1616
import { TranslateService } from '@ngx-translate/core';
1717
import { MockTranslateService } from 'test/helpers/mocks/service/mock-translate.service';
18-
import { GlobalSearchResult } from 'app/openapi/models/global-search-result';
18+
import { GlobalSearchResult } from 'app/openapi/model/global-search-result';
1919
import { GlobalSearchApi } from 'app/openapi/api/global-search-api';
2020
import { SearchView } from 'app/core/navbar/global-search/models/search-view.model';
2121
import { ProfileService } from 'app/core/layouts/profiles/shared/profile.service';

src/main/webapp/app/core/navbar/global-search/components/modal/global-search-modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { DialogModule } from 'primeng/dialog';
1212
import { SearchView } from 'app/core/navbar/global-search/models/search-view.model';
1313
import { GlobalSearchNavigationViewComponent } from 'app/core/navbar/global-search/components/views/navigation-view/global-search-navigation-view.component';
1414
import { MIN_SEARCH_QUERY_LENGTH, SEARCH_DEBOUNCE_MS, SearchResultView } from 'app/core/navbar/global-search/components/views/search-result-view.directive';
15-
import { GlobalSearchResult } from 'app/openapi/models/global-search-result';
15+
import { GlobalSearchResult } from 'app/openapi/model/global-search-result';
1616
import { GlobalSearchApi } from 'app/openapi/api/global-search-api';
1717
import { SearchInputComponent } from './search-input/search-input.component';
1818
import { SearchEntityType, SearchableEntity } from '../../models/searchable-entity.model';

src/main/webapp/app/core/navbar/global-search/components/modal/search-result-item/search-result-item.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22
import { SearchResultItemComponent } from './search-result-item.component';
3-
import { GlobalSearchResult } from 'app/openapi/models/global-search-result';
3+
import { GlobalSearchResult } from 'app/openapi/model/global-search-result';
44
import { faCube } from '@fortawesome/free-solid-svg-icons';
55
import { MockPipe } from 'ng-mocks';
66
import { ArtemisTranslatePipe } from 'app/foundation/pipes/artemis-translate.pipe';

0 commit comments

Comments
 (0)