From a2e3bfca02a952d5ea83d30b702dab7dd9ad69f2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 23 Jan 2025 12:11:46 +0200 Subject: [PATCH] fixes api --- angular/openapi.json | 2 +- angular/openapi.yaml | 29 ++- angular/src/app/_forms/apiForms.ts | 4 +- angular/src/app/_services/account.service.ts | 17 +- .../app/core/api/v1/.openapi-generator/FILES | 1 + .../app/core/api/v1/api/location.service.ts | 10 +- .../app/core/api/v1/api/loginCheck.service.ts | 178 ------------------ .../core/api/v1/api/mediaObject.service.ts | 8 +- .../api/v1/api/shippingCompany.service.ts | 10 +- .../src/app/core/api/v1/api/trip.service.ts | 8 +- .../core/api/v1/api/tripLocation.service.ts | 8 +- .../src/app/core/api/v1/api/user.service.ts | 10 +- .../app/core/api/v1/api/userTrip.service.ts | 8 +- .../api/v1/api/userTripLocation.service.ts | 8 +- .../api/v1/api/userTripWorkLog.service.ts | 8 +- .../src/app/core/api/v1/api/vessel.service.ts | 10 +- .../src/app/core/api/v1/api/zone.service.ts | 10 +- angular/src/app/core/api/v1/configuration.ts | 8 +- .../api/v1/model/loginCheckPost200Response.ts | 17 -- .../api/v1/model/loginCheckPostRequest.ts | 18 -- .../core/api/v1/model/mediaObjectJsonld.ts | 9 +- .../model/mediaObjectJsonldMediaObjectRead.ts | 24 --- httpdocs/config/packages/api_platform.yaml | 1 - httpdocs/src/ApiResource/MediaObjectApi.php | 68 +++++++ .../Controller/CreateMediaObjectAction.php | 30 ++- .../Mapper/MediaObjectEntityToApiMapper.php | 44 +++++ httpdocs/src/OpenApi/BearerTokenDecorator.php | 32 ++++ 27 files changed, 244 insertions(+), 336 deletions(-) delete mode 100644 angular/src/app/core/api/v1/api/loginCheck.service.ts delete mode 100644 angular/src/app/core/api/v1/model/loginCheckPost200Response.ts delete mode 100644 angular/src/app/core/api/v1/model/loginCheckPostRequest.ts delete mode 100644 angular/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts create mode 100644 httpdocs/src/ApiResource/MediaObjectApi.php create mode 100644 httpdocs/src/Mapper/MediaObjectEntityToApiMapper.php create mode 100644 httpdocs/src/OpenApi/BearerTokenDecorator.php diff --git a/angular/openapi.json b/angular/openapi.json index 03c3972..7ed246b 100644 --- a/angular/openapi.json +++ b/angular/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Imaq Platform","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/auth":{"post":{"operationId":"postCredentialsItem","tags":["Auth"],"responses":{"200":{"description":"Get JWT token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AuthResponse"}}}}},"summary":"Get JWT token to login.","requestBody":{"description":"Generate new JWT Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Credentials"}}},"required":false},"security":[]}},"\/api\/locations":{"get":{"operationId":"api_locations_get_collection","tags":["Location"],"responses":{"200":{"description":"Location collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Location.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Location resources.","description":"Retrieves the collection of Location resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_locations_post","tags":["Location"],"responses":{"201":{"description":"Location resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Location resource.","description":"Creates a Location resource.","parameters":[],"requestBody":{"description":"The new Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"required":true},"deprecated":false}},"\/api\/locations\/{id}":{"get":{"operationId":"api_locations_id_get","tags":["Location"],"responses":{"200":{"description":"Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Location resource.","description":"Retrieves a Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_locations_id_delete","tags":["Location"],"responses":{"204":{"description":"Location resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Location resource.","description":"Removes the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_locations_id_patch","tags":["Location"],"responses":{"200":{"description":"Location resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Location resource.","description":"Updates the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Location resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Location"}}},"required":true},"deprecated":false}},"\/api\/media_objects":{"get":{"operationId":"api_media_objects_get_collection","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of MediaObject resources.","description":"Retrieves the collection of MediaObject resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_media_objects_post","tags":["MediaObject"],"responses":{"201":{"description":"MediaObject resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a MediaObject resource.","description":"Creates a MediaObject resource.","parameters":[],"requestBody":{"description":"The new MediaObject resource","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false}},"\/api\/media_objects\/{id}":{"get":{"operationId":"api_media_objects_id_get","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a MediaObject resource.","description":"Retrieves a MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_media_objects_id_delete","tags":["MediaObject"],"responses":{"204":{"description":"MediaObject resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the MediaObject resource.","description":"Removes the MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/shipping_companies":{"get":{"operationId":"api_shipping_companies_get_collection","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of ShippingCompany resources.","description":"Retrieves the collection of ShippingCompany resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_shipping_companies_post","tags":["ShippingCompany"],"responses":{"201":{"description":"ShippingCompany resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a ShippingCompany resource.","description":"Creates a ShippingCompany resource.","parameters":[],"requestBody":{"description":"The new ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"required":true},"deprecated":false}},"\/api\/shipping_companies\/{id}":{"get":{"operationId":"api_shipping_companies_id_get","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a ShippingCompany resource.","description":"Retrieves a ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_shipping_companies_id_delete","tags":["ShippingCompany"],"responses":{"204":{"description":"ShippingCompany resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the ShippingCompany resource.","description":"Removes the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_shipping_companies_id_patch","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the ShippingCompany resource.","description":"Updates the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated ShippingCompany resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany"}}},"required":true},"deprecated":false}},"\/api\/trips":{"get":{"operationId":"api_trips_get_collection","tags":["Trip"],"responses":{"200":{"description":"Trip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Trip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Trip resources.","description":"Retrieves the collection of Trip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trips_post","tags":["Trip"],"responses":{"201":{"description":"Trip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Trip resource.","description":"Creates a Trip resource.","parameters":[],"requestBody":{"description":"The new Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trips\/{id}":{"get":{"operationId":"api_trips_id_get","tags":["Trip"],"responses":{"200":{"description":"Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Trip resource.","description":"Retrieves a Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trips_id_patch","tags":["Trip"],"responses":{"200":{"description":"Trip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Trip resource.","description":"Updates the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Trip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Trip"}}},"required":true},"deprecated":false}},"\/api\/trip_locations":{"get":{"operationId":"api_trip_locations_get_collection","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of TripLocation resources.","description":"Retrieves the collection of TripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trip_locations_post","tags":["TripLocation"],"responses":{"201":{"description":"TripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a TripLocation resource.","description":"Creates a TripLocation resource.","parameters":[],"requestBody":{"description":"The new TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trip_locations\/{id}":{"get":{"operationId":"api_trip_locations_id_get","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a TripLocation resource.","description":"Retrieves a TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trip_locations_id_patch","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the TripLocation resource.","description":"Updates the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated TripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation"}}},"required":true},"deprecated":false}},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"firstName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"lastName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"userNameSearch","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_users_post","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"required":true},"deprecated":false}},"\/api\/users\/{id}":{"get":{"operationId":"api_users_id_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_users_id_delete","tags":["User"],"responses":{"204":{"description":"User resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the User resource.","description":"Removes the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_users_id_patch","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the User resource.","description":"Updates the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated User resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/User"}}},"required":true},"deprecated":false}},"\/api\/user_trips":{"get":{"operationId":"api_user_trips_get_collection","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTrip resources.","description":"Retrieves the collection of UserTrip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trips_post","tags":["UserTrip"],"responses":{"201":{"description":"UserTrip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTrip resource.","description":"Creates a UserTrip resource.","parameters":[],"requestBody":{"description":"The new UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trips\/{id}":{"get":{"operationId":"api_user_trips_id_get","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTrip resource.","description":"Retrieves a UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trips_id_patch","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTrip resource.","description":"Updates the UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTrip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations":{"get":{"operationId":"api_user_trip_locations_get_collection","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripLocation resources.","description":"Retrieves the collection of UserTripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_locations_post","tags":["UserTripLocation"],"responses":{"201":{"description":"UserTripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripLocation resource.","description":"Creates a UserTripLocation resource.","parameters":[],"requestBody":{"description":"The new UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations\/{id}":{"get":{"operationId":"api_user_trip_locations_id_get","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripLocation resource.","description":"Retrieves a UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_locations_id_patch","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripLocation resource.","description":"Updates the UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs":{"get":{"operationId":"api_user_trip_work_logs_get_collection","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripWorkLog resources.","description":"Retrieves the collection of UserTripWorkLog resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_work_logs_post","tags":["UserTripWorkLog"],"responses":{"201":{"description":"UserTripWorkLog resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripWorkLog resource.","description":"Creates a UserTripWorkLog resource.","parameters":[],"requestBody":{"description":"The new UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs\/{id}":{"get":{"operationId":"api_user_trip_work_logs_id_get","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripWorkLog resource.","description":"Retrieves a UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_work_logs_id_patch","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripWorkLog resource.","description":"Updates the UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripWorkLog resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog"}}},"required":true},"deprecated":false}},"\/api\/vessels":{"get":{"operationId":"api_vessels_get_collection","tags":["Vessel"],"responses":{"200":{"description":"Vessel collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Vessel resources.","description":"Retrieves the collection of Vessel resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_vessels_post","tags":["Vessel"],"responses":{"201":{"description":"Vessel resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Vessel resource.","description":"Creates a Vessel resource.","parameters":[],"requestBody":{"description":"The new Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"required":true},"deprecated":false}},"\/api\/vessels\/{id}":{"get":{"operationId":"api_vessels_id_get","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Vessel resource.","description":"Retrieves a Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_vessels_id_delete","tags":["Vessel"],"responses":{"204":{"description":"Vessel resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Vessel resource.","description":"Removes the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_vessels_id_patch","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Vessel resource.","description":"Updates the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Vessel resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel"}}},"required":true},"deprecated":false}},"\/api\/zones":{"get":{"operationId":"api_zones_get_collection","tags":["Zone"],"responses":{"200":{"description":"Zone collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Zone.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Zone resources.","description":"Retrieves the collection of Zone resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_zones_post","tags":["Zone"],"responses":{"201":{"description":"Zone resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Zone resource.","description":"Creates a Zone resource.","parameters":[],"requestBody":{"description":"The new Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"required":true},"deprecated":false}},"\/api\/zones\/{id}":{"get":{"operationId":"api_zones_id_get","tags":["Zone"],"responses":{"200":{"description":"Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Zone resource.","description":"Retrieves a Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_zones_id_delete","tags":["Zone"],"responses":{"204":{"description":"Zone resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Zone resource.","description":"Removes the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_zones_id_patch","tags":["Zone"],"responses":{"200":{"description":"Zone resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Zone resource.","description":"Updates the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Zone resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Zone"}}},"required":true},"deprecated":false}}},"components":{"schemas":{"Location":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Location.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone.jsonld"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"MediaObject.jsonld":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"id":{"readOnly":true,"type":"integer"},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]},"file":{"type":["string","null"],"format":"binary"},"filePath":{"type":["string","null"]},"createdBy":{"$ref":"#\/components\/schemas\/User.jsonld"},"createdAt":{"readOnly":true,"type":"string","format":"date-time"}},"required":["file"]},"ShippingCompany":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"ShippingCompany.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Trip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"Trip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"readOnly":true,"$ref":"#\/components\/schemas\/Vessel.jsonld"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"TripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"TripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"User":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","lastName"]},"User.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","lastName"]},"UserTrip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"user":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTrip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"user":{"readOnly":true,"$ref":"#\/components\/schemas\/User.jsonld"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"plannedDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"plannedDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripWorkLog":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"UserTripWorkLog.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"Vessel":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Vessel.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Zone":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name"]},"Zone.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name"]},"Credentials":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com"},"password":{"type":"string","example":"password123"}}},"AuthResponse":{"type":"object","properties":{"token":{"type":"string","readOnly":true},"id":{"type":"integer","readOnly":true},"email":{"type":"string","readOnly":true},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"roles":{"type":"array","items":{"type":"string"},"readOnly":true},"user":{"$ref":"#\/components\/schemas\/User","readOnly":true}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"apiKey","description":"Value for the Authorization header parameter.","name":"Authorization","in":"header"}}},"security":[{"JWT":[]}],"tags":[],"webhooks":{}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Imaq Platform","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/auth":{"post":{"operationId":"postCredentialsItem","tags":["Auth"],"responses":{"200":{"description":"Get JWT token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AuthResponse"}}}}},"summary":"Get JWT token to login.","requestBody":{"description":"Generate new JWT Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Credentials"}}},"required":false},"security":[]}},"\/api\/locations":{"get":{"operationId":"api_locations_get_collection","tags":["Location"],"responses":{"200":{"description":"Location collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Location.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Location resources.","description":"Retrieves the collection of Location resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_locations_post","tags":["Location"],"responses":{"201":{"description":"Location resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Location resource.","description":"Creates a Location resource.","parameters":[],"requestBody":{"description":"The new Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"required":true},"deprecated":false}},"\/api\/locations\/{id}":{"get":{"operationId":"api_locations_id_get","tags":["Location"],"responses":{"200":{"description":"Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Location resource.","description":"Retrieves a Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_locations_id_delete","tags":["Location"],"responses":{"204":{"description":"Location resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Location resource.","description":"Removes the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_locations_id_patch","tags":["Location"],"responses":{"200":{"description":"Location resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Location resource.","description":"Updates the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Location resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Location"}}},"required":true},"deprecated":false}},"\/api\/media_objects":{"get":{"operationId":"api_media_objects_get_collection","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of MediaObject resources.","description":"Retrieves the collection of MediaObject resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_media_objects_post","tags":["MediaObject"],"responses":{"201":{"description":"MediaObject resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a MediaObject resource.","description":"Creates a MediaObject resource.","parameters":[],"requestBody":{"description":"The new MediaObject resource","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false}},"\/api\/media_objects\/{id}":{"get":{"operationId":"api_media_objects_id_get","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a MediaObject resource.","description":"Retrieves a MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_media_objects_id_delete","tags":["MediaObject"],"responses":{"204":{"description":"MediaObject resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the MediaObject resource.","description":"Removes the MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/shipping_companies":{"get":{"operationId":"api_shipping_companies_get_collection","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of ShippingCompany resources.","description":"Retrieves the collection of ShippingCompany resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_shipping_companies_post","tags":["ShippingCompany"],"responses":{"201":{"description":"ShippingCompany resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a ShippingCompany resource.","description":"Creates a ShippingCompany resource.","parameters":[],"requestBody":{"description":"The new ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"required":true},"deprecated":false}},"\/api\/shipping_companies\/{id}":{"get":{"operationId":"api_shipping_companies_id_get","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a ShippingCompany resource.","description":"Retrieves a ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_shipping_companies_id_delete","tags":["ShippingCompany"],"responses":{"204":{"description":"ShippingCompany resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the ShippingCompany resource.","description":"Removes the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_shipping_companies_id_patch","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the ShippingCompany resource.","description":"Updates the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated ShippingCompany resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany"}}},"required":true},"deprecated":false}},"\/api\/trips":{"get":{"operationId":"api_trips_get_collection","tags":["Trip"],"responses":{"200":{"description":"Trip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Trip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Trip resources.","description":"Retrieves the collection of Trip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trips_post","tags":["Trip"],"responses":{"201":{"description":"Trip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Trip resource.","description":"Creates a Trip resource.","parameters":[],"requestBody":{"description":"The new Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trips\/{id}":{"get":{"operationId":"api_trips_id_get","tags":["Trip"],"responses":{"200":{"description":"Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Trip resource.","description":"Retrieves a Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trips_id_patch","tags":["Trip"],"responses":{"200":{"description":"Trip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Trip resource.","description":"Updates the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Trip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Trip"}}},"required":true},"deprecated":false}},"\/api\/trip_locations":{"get":{"operationId":"api_trip_locations_get_collection","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of TripLocation resources.","description":"Retrieves the collection of TripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trip_locations_post","tags":["TripLocation"],"responses":{"201":{"description":"TripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a TripLocation resource.","description":"Creates a TripLocation resource.","parameters":[],"requestBody":{"description":"The new TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trip_locations\/{id}":{"get":{"operationId":"api_trip_locations_id_get","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a TripLocation resource.","description":"Retrieves a TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trip_locations_id_patch","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the TripLocation resource.","description":"Updates the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated TripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation"}}},"required":true},"deprecated":false}},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"firstName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"lastName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"userNameSearch","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_users_post","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"required":true},"deprecated":false}},"\/api\/users\/{id}":{"get":{"operationId":"api_users_id_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_users_id_delete","tags":["User"],"responses":{"204":{"description":"User resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the User resource.","description":"Removes the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_users_id_patch","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the User resource.","description":"Updates the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated User resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/User"}}},"required":true},"deprecated":false}},"\/api\/user_trips":{"get":{"operationId":"api_user_trips_get_collection","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTrip resources.","description":"Retrieves the collection of UserTrip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trips_post","tags":["UserTrip"],"responses":{"201":{"description":"UserTrip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTrip resource.","description":"Creates a UserTrip resource.","parameters":[],"requestBody":{"description":"The new UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trips\/{id}":{"get":{"operationId":"api_user_trips_id_get","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTrip resource.","description":"Retrieves a UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trips_id_patch","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTrip resource.","description":"Updates the UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTrip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations":{"get":{"operationId":"api_user_trip_locations_get_collection","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripLocation resources.","description":"Retrieves the collection of UserTripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_locations_post","tags":["UserTripLocation"],"responses":{"201":{"description":"UserTripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripLocation resource.","description":"Creates a UserTripLocation resource.","parameters":[],"requestBody":{"description":"The new UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations\/{id}":{"get":{"operationId":"api_user_trip_locations_id_get","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripLocation resource.","description":"Retrieves a UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_locations_id_patch","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripLocation resource.","description":"Updates the UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs":{"get":{"operationId":"api_user_trip_work_logs_get_collection","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripWorkLog resources.","description":"Retrieves the collection of UserTripWorkLog resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_work_logs_post","tags":["UserTripWorkLog"],"responses":{"201":{"description":"UserTripWorkLog resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripWorkLog resource.","description":"Creates a UserTripWorkLog resource.","parameters":[],"requestBody":{"description":"The new UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs\/{id}":{"get":{"operationId":"api_user_trip_work_logs_id_get","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripWorkLog resource.","description":"Retrieves a UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_work_logs_id_patch","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripWorkLog resource.","description":"Updates the UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripWorkLog resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog"}}},"required":true},"deprecated":false}},"\/api\/vessels":{"get":{"operationId":"api_vessels_get_collection","tags":["Vessel"],"responses":{"200":{"description":"Vessel collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Vessel resources.","description":"Retrieves the collection of Vessel resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_vessels_post","tags":["Vessel"],"responses":{"201":{"description":"Vessel resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Vessel resource.","description":"Creates a Vessel resource.","parameters":[],"requestBody":{"description":"The new Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"required":true},"deprecated":false}},"\/api\/vessels\/{id}":{"get":{"operationId":"api_vessels_id_get","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Vessel resource.","description":"Retrieves a Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_vessels_id_delete","tags":["Vessel"],"responses":{"204":{"description":"Vessel resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Vessel resource.","description":"Removes the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_vessels_id_patch","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Vessel resource.","description":"Updates the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Vessel resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel"}}},"required":true},"deprecated":false}},"\/api\/zones":{"get":{"operationId":"api_zones_get_collection","tags":["Zone"],"responses":{"200":{"description":"Zone collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Zone.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Zone resources.","description":"Retrieves the collection of Zone resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_zones_post","tags":["Zone"],"responses":{"201":{"description":"Zone resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Zone resource.","description":"Creates a Zone resource.","parameters":[],"requestBody":{"description":"The new Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"required":true},"deprecated":false}},"\/api\/zones\/{id}":{"get":{"operationId":"api_zones_id_get","tags":["Zone"],"responses":{"200":{"description":"Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Zone resource.","description":"Retrieves a Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_zones_id_delete","tags":["Zone"],"responses":{"204":{"description":"Zone resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Zone resource.","description":"Removes the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_zones_id_patch","tags":["Zone"],"responses":{"200":{"description":"Zone resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Zone resource.","description":"Updates the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Zone resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Zone"}}},"required":true},"deprecated":false}}},"components":{"schemas":{"Location":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Location.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"zone":{"$ref":"#\/components\/schemas\/Zone.jsonld"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"MediaObject.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]},"filePath":{"readOnly":true,"type":["string","null"]},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"ShippingCompany":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"ShippingCompany.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Trip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"Trip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"vessel":{"readOnly":true,"$ref":"#\/components\/schemas\/Vessel.jsonld"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"TripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"TripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"date":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"User":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","lastName"]},"User.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":"string"},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["email","firstName","lastName"]},"UserTrip":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"user":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTrip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"user":{"readOnly":true,"$ref":"#\/components\/schemas\/User.jsonld"},"captainName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTripLocation":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"plannedDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"plannedDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripWorkLog":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"UserTripWorkLog.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"Vessel":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Vessel.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Zone":{"type":"object","description":"","deprecated":false,"properties":{"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name"]},"Zone.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"dbId":{"readOnly":true,"type":["integer","null"]},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name"]},"Credentials":{"type":"object","properties":{"email":{"type":"string","example":"user@example.com"},"password":{"type":"string","example":"password123"}}},"AuthResponse":{"type":"object","properties":{"token":{"type":"string","readOnly":true},"id":{"type":"integer","readOnly":true},"email":{"type":"string","readOnly":true},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"roles":{"type":"array","items":{"type":"string"},"readOnly":true},"user":{"$ref":"#\/components\/schemas\/User","readOnly":true}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[],"webhooks":{}} \ No newline at end of file diff --git a/angular/openapi.yaml b/angular/openapi.yaml index f6a0f83..0d7b48d 100644 --- a/angular/openapi.yaml +++ b/angular/openapi.yaml @@ -2052,8 +2052,6 @@ components: type: object description: '' deprecated: false - externalDocs: - url: 'https://schema.org/MediaObject' properties: '@context': readOnly: true @@ -2078,32 +2076,28 @@ components: '@type': readOnly: true type: string - id: + dbId: readOnly: true - type: integer + type: + - integer + - 'null' contentUrl: externalDocs: url: 'https://schema.org/contentUrl' type: - string - 'null' - file: - type: - - string - - 'null' - format: binary filePath: + readOnly: true type: - string - 'null' - createdBy: - $ref: '#/components/schemas/User.jsonld' createdAt: readOnly: true - type: string + type: + - string + - 'null' format: date-time - required: - - file ShippingCompany: type: object description: '' @@ -2941,10 +2935,9 @@ components: headers: { } securitySchemes: JWT: - type: apiKey - description: 'Value for the Authorization header parameter.' - name: Authorization - in: header + type: http + scheme: bearer + bearerFormat: JWT security: - JWT: [] diff --git a/angular/src/app/_forms/apiForms.ts b/angular/src/app/_forms/apiForms.ts index 202f6d3..992b952 100644 --- a/angular/src/app/_forms/apiForms.ts +++ b/angular/src/app/_forms/apiForms.ts @@ -17,11 +17,9 @@ export const locationJsonldForm = new FormGroup({ }); export const mediaObjectJsonldForm = new FormGroup({ - id: new FormControl(null, []), + dbId: new FormControl(null, []), contentUrl: new FormControl(null, []), - file: new FormControl(null, [Validators.required]), filePath: new FormControl(null, []), - createdBy: new FormControl(null, []), createdAt: new FormControl(null, []) }); diff --git a/angular/src/app/_services/account.service.ts b/angular/src/app/_services/account.service.ts index 9234d09..d19e7c8 100644 --- a/angular/src/app/_services/account.service.ts +++ b/angular/src/app/_services/account.service.ts @@ -6,7 +6,8 @@ import { map } from 'rxjs/operators'; import { environment } from '@environments/environment'; import { User } from '@app/_models'; -import {LoginCheckService} from "@app/core/api/v1"; +import {AuthService} from "@app/core/api/v1"; + @Injectable({ providedIn: 'root' }) export class AccountService { @@ -17,7 +18,7 @@ export class AccountService { constructor( private router: Router, private http: HttpClient, - private loginCheckService: LoginCheckService + private loginCheckService: AuthService ) { this.userSubject = new BehaviorSubject(JSON.parse(localStorage.getItem('user')!)); this.user = this.userSubject.asObservable(); @@ -28,13 +29,15 @@ export class AccountService { } login(email: string, password: string) { - return this.loginCheckService.checkPost( + return this.loginCheckService.postCredentialsItem( { email, password } - ).pipe(map(user => { + ).pipe(map(authResponse => { // store user details and jwt token in local storage to keep user logged in between page refreshes - localStorage.setItem('user', JSON.stringify(user)); - this.userSubject.next(user); - return user; + localStorage.setItem('user', JSON.stringify(authResponse.user)); + if (authResponse.user) { + this.userSubject.next(authResponse.user); + } + return authResponse.user; })); // // return this.http.post(`${environment.apiUrl}/auth`, { email, password }) diff --git a/angular/src/app/core/api/v1/.openapi-generator/FILES b/angular/src/app/core/api/v1/.openapi-generator/FILES index f350f7e..5c9a88f 100644 --- a/angular/src/app/core/api/v1/.openapi-generator/FILES +++ b/angular/src/app/core/api/v1/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.openapi-generator-ignore README.md api.module.ts api/api.ts diff --git a/angular/src/app/core/api/v1/api/location.service.ts b/angular/src/app/core/api/v1/api/location.service.ts index 0a879c1..191c168 100644 --- a/angular/src/app/core/api/v1/api/location.service.ts +++ b/angular/src/app/core/api/v1/api/location.service.ts @@ -139,7 +139,7 @@ export class LocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -212,7 +212,7 @@ export class LocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -283,7 +283,7 @@ export class LocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -359,7 +359,7 @@ export class LocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -441,7 +441,7 @@ export class LocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/loginCheck.service.ts b/angular/src/app/core/api/v1/api/loginCheck.service.ts deleted file mode 100644 index 6a5c15d..0000000 --- a/angular/src/app/core/api/v1/api/loginCheck.service.ts +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Imaq Platform - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { LoginCheckPost200Response } from '../model/loginCheckPost200Response'; -// @ts-ignore -import { LoginCheckPostRequest } from '../model/loginCheckPostRequest'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable({ - providedIn: 'root' -}) -export class LoginCheckService { - - protected basePath = 'http://localhost'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (Array.isArray(basePath) && basePath.length > 0) { - basePath = basePath[0]; - } - - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - // @ts-ignore - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - httpParams = this.addToHttpParamsRecursive(httpParams, value); - } else { - httpParams = this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams = httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Creates a user token. - * Creates a user token. - * @param loginCheckPostRequest The login data - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public checkPost(loginCheckPostRequest: LoginCheckPostRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public checkPost(loginCheckPostRequest: LoginCheckPostRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public checkPost(loginCheckPostRequest: LoginCheckPostRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public checkPost(loginCheckPostRequest: LoginCheckPostRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (loginCheckPostRequest === null || loginCheckPostRequest === undefined) { - throw new Error('Required parameter loginCheckPostRequest was null or undefined when calling checkPost.'); - } - - let localVarHeaders = this.defaultHeaders; - - let localVarCredential: string | undefined; - // authentication (JWT) required - localVarCredential = this.configuration.lookupCredential('JWT'); - if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); - } - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth`; - return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: loginCheckPostRequest, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - transferCache: localVarTransferCache, - reportProgress: reportProgress - } - ); - } - -} diff --git a/angular/src/app/core/api/v1/api/mediaObject.service.ts b/angular/src/app/core/api/v1/api/mediaObject.service.ts index 92346a2..03d96b3 100644 --- a/angular/src/app/core/api/v1/api/mediaObject.service.ts +++ b/angular/src/app/core/api/v1/api/mediaObject.service.ts @@ -135,7 +135,7 @@ export class MediaObjectService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -208,7 +208,7 @@ export class MediaObjectService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -279,7 +279,7 @@ export class MediaObjectService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -348,7 +348,7 @@ export class MediaObjectService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/shippingCompany.service.ts b/angular/src/app/core/api/v1/api/shippingCompany.service.ts index a29f1f8..fb0aace 100644 --- a/angular/src/app/core/api/v1/api/shippingCompany.service.ts +++ b/angular/src/app/core/api/v1/api/shippingCompany.service.ts @@ -139,7 +139,7 @@ export class ShippingCompanyService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -212,7 +212,7 @@ export class ShippingCompanyService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -283,7 +283,7 @@ export class ShippingCompanyService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -359,7 +359,7 @@ export class ShippingCompanyService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -441,7 +441,7 @@ export class ShippingCompanyService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/trip.service.ts b/angular/src/app/core/api/v1/api/trip.service.ts index e2a06d5..9d5fff2 100644 --- a/angular/src/app/core/api/v1/api/trip.service.ts +++ b/angular/src/app/core/api/v1/api/trip.service.ts @@ -124,7 +124,7 @@ export class TripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -197,7 +197,7 @@ export class TripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -273,7 +273,7 @@ export class TripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -355,7 +355,7 @@ export class TripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/tripLocation.service.ts b/angular/src/app/core/api/v1/api/tripLocation.service.ts index 176f31a..35cace8 100644 --- a/angular/src/app/core/api/v1/api/tripLocation.service.ts +++ b/angular/src/app/core/api/v1/api/tripLocation.service.ts @@ -124,7 +124,7 @@ export class TripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -197,7 +197,7 @@ export class TripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -273,7 +273,7 @@ export class TripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -355,7 +355,7 @@ export class TripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/user.service.ts b/angular/src/app/core/api/v1/api/user.service.ts index 1073dce..dd73b3b 100644 --- a/angular/src/app/core/api/v1/api/user.service.ts +++ b/angular/src/app/core/api/v1/api/user.service.ts @@ -144,7 +144,7 @@ export class UserService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -217,7 +217,7 @@ export class UserService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -288,7 +288,7 @@ export class UserService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -364,7 +364,7 @@ export class UserService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -446,7 +446,7 @@ export class UserService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/userTrip.service.ts b/angular/src/app/core/api/v1/api/userTrip.service.ts index 227d3b9..2e15b4f 100644 --- a/angular/src/app/core/api/v1/api/userTrip.service.ts +++ b/angular/src/app/core/api/v1/api/userTrip.service.ts @@ -124,7 +124,7 @@ export class UserTripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -197,7 +197,7 @@ export class UserTripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -273,7 +273,7 @@ export class UserTripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -355,7 +355,7 @@ export class UserTripService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/userTripLocation.service.ts b/angular/src/app/core/api/v1/api/userTripLocation.service.ts index 4d12fb6..f2301dc 100644 --- a/angular/src/app/core/api/v1/api/userTripLocation.service.ts +++ b/angular/src/app/core/api/v1/api/userTripLocation.service.ts @@ -124,7 +124,7 @@ export class UserTripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -197,7 +197,7 @@ export class UserTripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -273,7 +273,7 @@ export class UserTripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -355,7 +355,7 @@ export class UserTripLocationService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts b/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts index 64692eb..feff8c7 100644 --- a/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts +++ b/angular/src/app/core/api/v1/api/userTripWorkLog.service.ts @@ -124,7 +124,7 @@ export class UserTripWorkLogService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -197,7 +197,7 @@ export class UserTripWorkLogService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -273,7 +273,7 @@ export class UserTripWorkLogService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -355,7 +355,7 @@ export class UserTripWorkLogService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/vessel.service.ts b/angular/src/app/core/api/v1/api/vessel.service.ts index 29df91f..48a591f 100644 --- a/angular/src/app/core/api/v1/api/vessel.service.ts +++ b/angular/src/app/core/api/v1/api/vessel.service.ts @@ -139,7 +139,7 @@ export class VesselService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -212,7 +212,7 @@ export class VesselService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -283,7 +283,7 @@ export class VesselService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -359,7 +359,7 @@ export class VesselService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -441,7 +441,7 @@ export class VesselService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/api/zone.service.ts b/angular/src/app/core/api/v1/api/zone.service.ts index cb860a3..0c2c112 100644 --- a/angular/src/app/core/api/v1/api/zone.service.ts +++ b/angular/src/app/core/api/v1/api/zone.service.ts @@ -139,7 +139,7 @@ export class ZoneService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -212,7 +212,7 @@ export class ZoneService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -283,7 +283,7 @@ export class ZoneService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -359,7 +359,7 @@ export class ZoneService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; @@ -441,7 +441,7 @@ export class ZoneService { // authentication (JWT) required localVarCredential = this.configuration.lookupCredential('JWT'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; diff --git a/angular/src/app/core/api/v1/configuration.ts b/angular/src/app/core/api/v1/configuration.ts index 53d088c..7012fcc 100644 --- a/angular/src/app/core/api/v1/configuration.ts +++ b/angular/src/app/core/api/v1/configuration.ts @@ -90,11 +90,9 @@ export class Configuration { // init default JWT credential if (!this.credentials['JWT']) { this.credentials['JWT'] = () => { - if (this.apiKeys === null || this.apiKeys === undefined) { - return undefined; - } else { - return this.apiKeys['JWT'] || this.apiKeys['Authorization']; - } + return typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; }; } } diff --git a/angular/src/app/core/api/v1/model/loginCheckPost200Response.ts b/angular/src/app/core/api/v1/model/loginCheckPost200Response.ts deleted file mode 100644 index fab630b..0000000 --- a/angular/src/app/core/api/v1/model/loginCheckPost200Response.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Imaq Platform - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface LoginCheckPost200Response { - readonly token: string; -} - diff --git a/angular/src/app/core/api/v1/model/loginCheckPostRequest.ts b/angular/src/app/core/api/v1/model/loginCheckPostRequest.ts deleted file mode 100644 index 1360d9f..0000000 --- a/angular/src/app/core/api/v1/model/loginCheckPostRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Imaq Platform - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface LoginCheckPostRequest { - email: string; - password: string; -} - diff --git a/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts b/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts index 35957fa..aa4a61b 100644 --- a/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts +++ b/angular/src/app/core/api/v1/model/mediaObjectJsonld.ts @@ -9,7 +9,6 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { UserJsonld } from './userJsonld'; import { LocationJsonldContext } from './locationJsonldContext'; @@ -20,11 +19,9 @@ export interface MediaObjectJsonld { context?: LocationJsonldContext; readonly id?: string; readonly type?: string; - readonly id?: number; + readonly dbId?: number | null; contentUrl?: string | null; - file: Blob | null; - filePath?: string | null; - createdBy?: UserJsonld; - readonly createdAt?: string; + readonly filePath?: string | null; + readonly createdAt?: string | null; } diff --git a/angular/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts b/angular/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts deleted file mode 100644 index 998b0b9..0000000 --- a/angular/src/app/core/api/v1/model/mediaObjectJsonldMediaObjectRead.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Imaq Platform - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { LocationJsonldContext } from './locationJsonldContext'; - - -/** - * - */ -export interface MediaObjectJsonldMediaObjectRead { - context?: LocationJsonldContext; - readonly id?: string; - readonly type?: string; - contentUrl?: string | null; -} - diff --git a/httpdocs/config/packages/api_platform.yaml b/httpdocs/config/packages/api_platform.yaml index fb47185..54e2b3c 100644 --- a/httpdocs/config/packages/api_platform.yaml +++ b/httpdocs/config/packages/api_platform.yaml @@ -17,7 +17,6 @@ api_platform: pagination_items_per_page: 50 pagination_maximum_items_per_page: 100 - swagger: api_keys: JWT: diff --git a/httpdocs/src/ApiResource/MediaObjectApi.php b/httpdocs/src/ApiResource/MediaObjectApi.php new file mode 100644 index 0000000..57e4cf3 --- /dev/null +++ b/httpdocs/src/ApiResource/MediaObjectApi.php @@ -0,0 +1,68 @@ + [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'file' => [ + 'type' => 'string', + 'format' => 'binary' + ] + ] + ] + ] + ]) + ) + ), + deserialize: false + ), + new Delete(), + ], + security: 'is_granted("ROLE_USER")', + provider: EntityToDtoStateProvider::class, + processor: EntityClassDtoStateProcessor::class, + stateOptions: new Options(entityClass: MediaObject::class), +)] +class MediaObjectApi +{ + #[ApiProperty(readable: false, writable: false, identifier: true)] + public ?int $id = null; + + #[ApiProperty(writable: false)] + public ?int $dbId = null; + + #[ApiProperty(types: ['https://schema.org/contentUrl'])] + public ?string $contentUrl = null; + + // Optional: Wenn Sie das Filepath in der API sehen möchten + #[ApiProperty(writable: false)] + public ?string $filePath = null; + + #[ApiProperty(writable: false)] + public ?\DateTimeImmutable $createdAt = null; +} \ No newline at end of file diff --git a/httpdocs/src/Controller/CreateMediaObjectAction.php b/httpdocs/src/Controller/CreateMediaObjectAction.php index 64ad042..05d9fa2 100644 --- a/httpdocs/src/Controller/CreateMediaObjectAction.php +++ b/httpdocs/src/Controller/CreateMediaObjectAction.php @@ -1,35 +1,47 @@ - * @date 25.01.24 - */ - namespace App\Controller; - +use App\ApiResource\MediaObjectApi; use App\Entity\MediaObject; use App\Entity\User; +use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\Finder\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Attribute\AsController; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Symfonycasts\MicroMapper\MicroMapperInterface; #[AsController] final class CreateMediaObjectAction extends AbstractController { - public function __invoke(Request $request): MediaObject + public function __construct( + private MicroMapperInterface $microMapper, + private EntityManagerInterface $em + ) { + } + + public function __invoke(Request $request): JsonResponse { $uploadedFile = $request->files->get('file'); if (!$uploadedFile) { throw new BadRequestHttpException('"file" is required'); } + // Sicherstellen dass ein User vorhanden ist $user = $this->getUser(); - assert($user instanceof User); + if (!$user instanceof User) { + throw new AccessDeniedException('User must be logged in'); + } + $mediaObject = new MediaObject($user); $mediaObject->file = $uploadedFile; + $this->em->persist($mediaObject); + $this->em->flush(); - return $mediaObject; + $mediaObjectApi = $this->microMapper->map($mediaObject, MediaObjectApi::class); + return new JsonResponse($mediaObjectApi); } } \ No newline at end of file diff --git a/httpdocs/src/Mapper/MediaObjectEntityToApiMapper.php b/httpdocs/src/Mapper/MediaObjectEntityToApiMapper.php new file mode 100644 index 0000000..1d54ea6 --- /dev/null +++ b/httpdocs/src/Mapper/MediaObjectEntityToApiMapper.php @@ -0,0 +1,44 @@ +id = $entity->getId(); + + return $dto; + } + + public function populate(object $from, object $to, array $context): object + { + $entity = $from; + $dto = $to; + assert($entity instanceof MediaObject); + assert($dto instanceof MediaObjectApi); + + $dto->dbId = $entity->getId(); + $dto->filePath = $entity->getFilePath(); + $dto->contentUrl = $this->storage->resolveUri($entity, 'file'); + $dto->createdAt = $entity->getCreatedAt(); + + return $dto; + } +} \ No newline at end of file diff --git a/httpdocs/src/OpenApi/BearerTokenDecorator.php b/httpdocs/src/OpenApi/BearerTokenDecorator.php new file mode 100644 index 0000000..6878f04 --- /dev/null +++ b/httpdocs/src/OpenApi/BearerTokenDecorator.php @@ -0,0 +1,32 @@ +decorated)($context); + + $schemas = $openApi->getComponents()->getSecuritySchemes(); + + $schemas['JWT'] = new \ArrayObject([ + 'type' => 'http', + 'scheme' => 'bearer', + 'bearerFormat' => 'JWT' + ]); + + return $openApi; + } +} \ No newline at end of file