fix(ocr): regenerate TypeScript types so TriggerSenderTrainingDTO.personId is non-optional #266
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Deferred during PR #265 review cycle 2.
Concern
The generated TypeScript type for
TriggerSenderTrainingDTOshowspersonId?: string(optional) even though the Java record has@Schema(requiredMode = REQUIRED)and@NotNull. The running Docker backend is an older image without the feature branch code, so regenerating types was not possible during the PR review cycle.Reviewer @Nora (security): "The
personIdfield inTriggerSenderTrainingDTOis@NotNullon the backend but shows as optional (personId?: string) in the generated TypeScript — fix by regenerating types once the feature branch is merged."Why deferred
Regenerating types requires:
./mvnw clean package -DskipTests)--spring.profiles.active=dev— conflicts with the running Docker backend on port 8080npm run generate:apiinfrontend/This is safe to do after the feature branch merges to main.
Steps
cd backend && ./mvnw clean package -DskipTestsdocker-compose stop backendjava -jar target/*.jar --spring.profiles.active=devcd frontend && npm run generate:apiTriggerSenderTrainingDTO.personIdis nowpersonId: string(required)Reference
PR: http://heim-nas:3005/marcel/familienarchiv/pulls/265