| @@ -12,6 +12,13 @@ find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydralast/'hydra: | |||||
| find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydranext/'hydra:next'/g" {} + | find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydranext/'hydra:next'/g" {} + | ||||
| find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydraprevious/'hydra:previous'/g" {} + | find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydraprevious/'hydra:previous'/g" {} + | ||||
| # Entferne "context?: ..." | |||||
| find ./src/app/core/api/v1/model -type f -name '*.ts' -exec sed -i '' '/context\?: .*;/d' {} + | |||||
| # Ersetze in jeder Datei nur das erste Vorkommen von "readonly type?: string;" | |||||
| # durch "readonly xType?: string;" | |||||
| find ./src/app/core/api/v1/model -type f -name '*.ts' -exec perl -i -pe 'if($.==1){$x=0} if(!$x && /^(\s*)readonly type\?: string;/){ $x=1; s//$1readonly xType?: string;/ }' {} \; | |||||
| # https://dev.to/martinmcwhorter/generate-angular-reactiveforms-from-swagger-openapi-35h9 -> alternative | # https://dev.to/martinmcwhorter/generate-angular-reactiveforms-from-swagger-openapi-35h9 -> alternative | ||||
| # https://github.com/Humbertda/ngx-openapi-form-generator -> alternative | # https://github.com/Humbertda/ngx-openapi-form-generator -> alternative | ||||
| @@ -19,7 +19,7 @@ export interface ConstraintViolationJson { | |||||
| status?: number; | status?: number; | ||||
| violations?: Array<ConstraintViolationJsonViolationsInner>; | violations?: Array<ConstraintViolationJsonViolationsInner>; | ||||
| readonly detail?: string; | readonly detail?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly title?: string | null; | readonly title?: string | null; | ||||
| readonly instance?: string | null; | readonly instance?: string | null; | ||||
| } | } | ||||
| @@ -17,8 +17,8 @@ import { ConstraintViolationJsonViolationsInner } from './constraintViolationJso | |||||
| * Unprocessable entity | * Unprocessable entity | ||||
| */ | */ | ||||
| export interface ConstraintViolationJsonldJsonld { | export interface ConstraintViolationJsonldJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly xType?: string; | |||||
| status?: number; | status?: number; | ||||
| violations?: Array<ConstraintViolationJsonViolationsInner>; | violations?: Array<ConstraintViolationJsonViolationsInner>; | ||||
| readonly detail?: string; | readonly detail?: string; | ||||
| @@ -16,8 +16,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * A representation of common errors. | * A representation of common errors. | ||||
| */ | */ | ||||
| export interface ErrorJsonld { | export interface ErrorJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly xType?: string; | |||||
| /** | /** | ||||
| * A short, human-readable summary of the problem. | * A short, human-readable summary of the problem. | ||||
| */ | */ | ||||
| @@ -16,9 +16,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface EventJsonld { | export interface EventJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| name?: string; | name?: string; | ||||
| identifier?: string; | identifier?: string; | ||||
| @@ -17,9 +17,8 @@ import { ZoneJsonld } from './zoneJsonld'; | |||||
| * | * | ||||
| */ | */ | ||||
| export interface LocationJsonld { | export interface LocationJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| readonly zone?: ZoneJsonld; | readonly zone?: ZoneJsonld; | ||||
| zoneIri: string | null; | zoneIri: string | null; | ||||
| @@ -16,9 +16,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface MediaObjectJsonld { | export interface MediaObjectJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| contentUrl?: string | null; | contentUrl?: string | null; | ||||
| readonly filePath?: string | null; | readonly filePath?: string | null; | ||||
| @@ -31,6 +31,6 @@ export interface ModelError { | |||||
| /** | /** | ||||
| * A URI reference that identifies the problem type | * A URI reference that identifies the problem type | ||||
| */ | */ | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| } | } | ||||
| @@ -16,9 +16,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface ShippingCompanyJsonld { | export interface ShippingCompanyJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| name: string; | name: string; | ||||
| code: string; | code: string; | ||||
| @@ -18,9 +18,8 @@ import { LocationJsonld } from './locationJsonld'; | |||||
| * | * | ||||
| */ | */ | ||||
| export interface TripJsonld { | export interface TripJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| readonly vessel?: VesselJsonld; | readonly vessel?: VesselJsonld; | ||||
| vesselIri: string | null; | vesselIri: string | null; | ||||
| @@ -18,9 +18,8 @@ import { LocationJsonld } from './locationJsonld'; | |||||
| * | * | ||||
| */ | */ | ||||
| export interface TripLocationJsonld { | export interface TripLocationJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| trip?: TripJsonld; | trip?: TripJsonld; | ||||
| tripIri: string | null; | tripIri: string | null; | ||||
| @@ -17,9 +17,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface UserJsonld { | export interface UserJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| email: string; | email: string; | ||||
| firstName: string; | firstName: string; | ||||
| @@ -20,9 +20,8 @@ import { LocationJsonld } from './locationJsonld'; | |||||
| * | * | ||||
| */ | */ | ||||
| export interface UserTripEventJsonld { | export interface UserTripEventJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| readonly userTrip?: UserTripJsonld; | readonly userTrip?: UserTripJsonld; | ||||
| userTripIri: string | null; | userTripIri: string | null; | ||||
| @@ -19,9 +19,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface UserTripJsonld { | export interface UserTripJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| readonly trip?: TripJsonld; | readonly trip?: TripJsonld; | ||||
| tripIri: string | null; | tripIri: string | null; | ||||
| @@ -17,9 +17,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface VesselJsonld { | export interface VesselJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| name: string; | name: string; | ||||
| code: string; | code: string; | ||||
| @@ -16,9 +16,8 @@ import { ConstraintViolationJsonldJsonldContext } from './constraintViolationJso | |||||
| * | * | ||||
| */ | */ | ||||
| export interface ZoneJsonld { | export interface ZoneJsonld { | ||||
| context?: ConstraintViolationJsonldJsonldContext; | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | |||||
| readonly xType?: string; | |||||
| readonly dbId?: number | null; | readonly dbId?: number | null; | ||||
| name: string; | name: string; | ||||
| readonly createdAt?: string | null; | readonly createdAt?: string | null; | ||||
| @@ -140,7 +140,7 @@ class UserTripEventApi | |||||
| #[Assert\NotBlank] | #[Assert\NotBlank] | ||||
| public \DateTimeImmutable $date; | public \DateTimeImmutable $date; | ||||
| public ?string $note; | |||||
| public ?string $note = null; | |||||
| #[ApiProperty(writable: false)] | #[ApiProperty(writable: false)] | ||||
| public ?\DateTimeImmutable $createdAt = null; | public ?\DateTimeImmutable $createdAt = null; | ||||