瀏覽代碼

fix type error and post of user trip events

master
Daniel 10 月之前
父節點
當前提交
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/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://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;
violations?: Array<ConstraintViolationJsonViolationsInner>;
readonly detail?: string;
readonly type?: string;
readonly xType?: string;
readonly title?: 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
*/
export interface ConstraintViolationJsonldJsonld {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly xType?: string;
status?: number;
violations?: Array<ConstraintViolationJsonViolationsInner>;
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.
*/
export interface ErrorJsonld {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly xType?: string;
/**
* 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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
name?: 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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
readonly zone?: ZoneJsonld;
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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
contentUrl?: 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
*/
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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
name: 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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
readonly vessel?: VesselJsonld;
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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
trip?: TripJsonld;
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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
email: 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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
readonly userTrip?: UserTripJsonld;
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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
readonly trip?: TripJsonld;
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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
name: 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 {
context?: ConstraintViolationJsonldJsonldContext;
readonly id?: string;
readonly type?: string;
readonly xType?: string;
readonly dbId?: number | null;
name: string;
readonly createdAt?: string | null;


+ 1
- 1
httpdocs/src/ApiResource/UserTripEventApi.php 查看文件

@@ -140,7 +140,7 @@ class UserTripEventApi
#[Assert\NotBlank]
public \DateTimeImmutable $date;

public ?string $note;
public ?string $note = null;

#[ApiProperty(writable: false)]
public ?\DateTimeImmutable $createdAt = null;

Loading…
取消
儲存