30 lines
921 B
Markdown
30 lines
921 B
Markdown
# Webapp
|
|
|
|
Angular 18 single-page application with Angular Material.
|
|
|
|
## Development
|
|
|
|
Run `npm start` for a dev server at `http://localhost:4200/`. The application will automatically reload on file changes.
|
|
|
|
## OpenAPI Client
|
|
|
|
Gradle exports the backend OpenAPI schema from the FastAPI app and generates the Angular client from that schema:
|
|
|
|
```bash
|
|
../gradlew :webapp:generateOpenApiClient
|
|
```
|
|
|
|
The generated client is written to `src/app/api`. The schema file is written to `../service/build/openapi/inse-service.openapi.json`.
|
|
|
|
If the schema was already exported, the npm script can regenerate only the frontend client:
|
|
|
|
```bash
|
|
npm run generate:api
|
|
```
|
|
|
|
Use the generated services for new backend endpoints so request models, response models, and operation names stay aligned with the FastAPI OpenAPI schema.
|
|
|
|
## Build
|
|
|
|
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|