budrobundy69 / budrobundy69/openapi-angular-spring-example
π§© Integrate OpenAPI TypeScript Client into Angular 19 with Signals
- Lingua principale
- HTML
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### π§© Integrate OpenAPI TypeScript Client into Angular 19 with Signals
**Goal:** Use the generated OpenAPI TS client to communicate with the backend, and manage state using Angular Signals and SignalStore.
---
### β Tasks
#### 1. Setup SignalStore
- [ ] Create a signal store (`apiStore`) in `frontend/src/app/stores/`
- [ ] Store loading state, errors, and response data
- [ ] Export actions for component usage
#### 2. Create ApiService Wrapper
- [ ] Create `api.service.ts` in `frontend/src/app/services/`
- [ ] Inject OpenAPI-generated services (e.g., `DefaultService`)
- [ ] Wrap service methods to return observables or promises
- [ ] Handle and log HTTP errors gracefully
#### 3. Create Example Feature
- [ ] Create a component that:
- [ ] Triggers an API call using the store
- [ ] Displays loading/error/success state
- [ ] Uses Signals for UI updates
#### 4. Optional: Add Test Coverage
- [ ] Unit test the SignalStore and ApiService
- [ ] Mock OpenAPI responses
---
### π Suggested Structure
frontend/
βββ src/
β βββ app/
β β βββ api/ # OpenAPI-generated
β β βββ services/
β β β βββ api.service.ts
β β βββ stores/
β β β βββ api.store.ts
β β βββ features/
β β βββ sample/
β β βββ sample.component.ts
---
### π Next Steps (Separate Issues)
- Add tests to CI
- Extend SignalStore pattern across features
- Trigger OpenAPI client generation automatically in CI
- Cloud Foundry deploy with OpenAPI client
---
**Labels:** `π openapi`, `π§± frontend`, `π angular`, `π¦ integration`, `β‘ state`, `π§ͺ test`
**Milestone:** `M1 - Backend MVP`
**Project:** `OpenAPI Angular Spring Example`
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non Γ¨ ancora stata valutata.