Просмотр исходного кода

fix type error and post of user trip events

master
Daniel 10 месяцев назад
Родитель
Сommit
41fe8743e4
17 измененных файлов: 23 добавлений и 27 удалений
  1. +7
    -0
      angular/generateApi.sh
  2. +1
    -1
      angular/src/app/core/api/v1/model/constraintViolationJson.ts
  3. +1
    -1
      angular/src/app/core/api/v1/model/constraintViolationJsonldJsonld.ts
  4. +1
    -1
      angular/src/app/core/api/v1/model/errorJsonld.ts
  5. +1
    -2
      angular/src/app/core/api/v1/model/eventJsonld.ts
  6. +1
    -2
      angular/src/app/core/api/v1/model/locationJsonld.ts
  7. +1
    -2
      angular/src/app/core/api/v1/model/mediaObjectJsonld.ts
  8. +1
    -1
      angular/src/app/core/api/v1/model/modelError.ts
  9. +1
    -2
      angular/src/app/core/api/v1/model/shippingCompanyJsonld.ts
  10. +1
    -2
      angular/src/app/core/api/v1/model/tripJsonld.ts
  11. +1
    -2
      angular/src/app/core/api/v1/model/tripLocationJsonld.ts
  12. +1
    -2
      angular/src/app/core/api/v1/model/userJsonld.ts
  13. +1
    -2
      angular/src/app/core/api/v1/model/userTripEventJsonld.ts
  14. +1
    -2
      angular/src/app/core/api/v1/model/userTripJsonld.ts
  15. +1
    -2
      angular/src/app/core/api/v1/model/vesselJsonld.ts
  16. +1
    -2
      angular/src/app/core/api/v1/model/zoneJsonld.ts
  17. +1
    -1
      httpdocs/src/ApiResource/UserTripEventApi.php

+ 7
- 0
angular/generateApi.sh Просмотреть файл

@@ -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


+ 1
- 1
angular/src/app/core/api/v1/model/constraintViolationJson.ts Просмотреть файл

@@ -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;
} }


+ 1
- 1
angular/src/app/core/api/v1/model/constraintViolationJsonldJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 1
angular/src/app/core/api/v1/model/errorJsonld.ts Просмотреть файл

@@ -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.
*/ */


+ 1
- 2
angular/src/app/core/api/v1/model/eventJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/locationJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/mediaObjectJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 1
angular/src/app/core/api/v1/model/modelError.ts Просмотреть файл

@@ -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;
} }



+ 1
- 2
angular/src/app/core/api/v1/model/shippingCompanyJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/tripJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/tripLocationJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/userJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/userTripEventJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/userTripJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/vesselJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 2
angular/src/app/core/api/v1/model/zoneJsonld.ts Просмотреть файл

@@ -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;


+ 1
- 1
httpdocs/src/ApiResource/UserTripEventApi.php Просмотреть файл

@@ -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;

Загрузка…
Отмена
Сохранить