From e4cd658532a3d6d8fc2e191af6257ba5759d8bc6 Mon Sep 17 00:00:00 2001 From: Florian Eisenmenger Date: Tue, 5 Mar 2024 11:14:15 +0100 Subject: [PATCH] refactoring edit / new contact --- matsen-tool/openapi.json | 2 +- matsen-tool/openapi.yaml | 25 +++++++ .../src/app/_helpers/formgroup.initializer.ts | 12 ++++ matsen-tool/src/app/_helpers/modal.states.ts | 4 ++ .../src/app/_interfaces/modalContent.ts | 2 +- matsen-tool/src/app/app.component.scss | 18 ----- .../contacts-detail.component.html | 3 +- .../contacts-detail.component.ts | 15 +++- .../new-contact/new-contact.component.html | 8 +-- .../new-contact/new-contact.component.ts | 47 +++++++----- .../src/app/core/api/v1/api/media.service.ts | 71 +++++++++++++++++++ .../partners-detail.component.ts | 50 +++++++------ matsen-tool/src/styles.scss | 37 +++++++--- 13 files changed, 219 insertions(+), 75 deletions(-) create mode 100644 matsen-tool/src/app/_helpers/formgroup.initializer.ts create mode 100644 matsen-tool/src/app/_helpers/modal.states.ts diff --git a/matsen-tool/openapi.json b/matsen-tool/openapi.json index c1733c7..a39cdc8 100644 --- a/matsen-tool/openapi.json +++ b/matsen-tool/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Matsen API Platform","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/comments":{"get":{"operationId":"api_comments_get_collection","tags":["Comment"],"responses":{"200":{"description":"Comment collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Comment resources.","description":"Retrieves the collection of Comment 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_comments_post","tags":["Comment"],"responses":{"201":{"description":"Comment resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Comment resource.","description":"Creates a Comment resource.","parameters":[],"requestBody":{"description":"The new Comment resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/comments\/{id}":{"get":{"operationId":"api_comments_id_get","tags":["Comment"],"responses":{"200":{"description":"Comment resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Comment resource.","description":"Retrieves a Comment resource.","parameters":[{"name":"id","in":"path","description":"CommentApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_comments_id_delete","tags":["Comment"],"responses":{"204":{"description":"Comment resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Comment resource.","description":"Removes the Comment resource.","parameters":[{"name":"id","in":"path","description":"CommentApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_comments_id_patch","tags":["Comment"],"responses":{"200":{"description":"Comment resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Comment resource.","description":"Updates the Comment resource.","parameters":[{"name":"id","in":"path","description":"CommentApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Comment resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/contacts":{"get":{"operationId":"api_contacts_get_collection","tags":["Contact"],"responses":{"200":{"description":"Contact collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Contact resources.","description":"Retrieves the collection of Contact 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false},{"name":"partner","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"partner[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_contacts_post","tags":["Contact"],"responses":{"201":{"description":"Contact resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Contact resource.","description":"Creates a Contact resource.","parameters":[],"requestBody":{"description":"The new Contact resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/contacts\/{id}":{"get":{"operationId":"api_contacts_id_get","tags":["Contact"],"responses":{"200":{"description":"Contact resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Contact resource.","description":"Retrieves a Contact resource.","parameters":[{"name":"id","in":"path","description":"ContactApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_contacts_id_delete","tags":["Contact"],"responses":{"204":{"description":"Contact resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Contact resource.","description":"Removes the Contact resource.","parameters":[{"name":"id","in":"path","description":"ContactApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_contacts_id_patch","tags":["Contact"],"responses":{"200":{"description":"Contact resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Contact resource.","description":"Updates the Contact resource.","parameters":[{"name":"id","in":"path","description":"ContactApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Contact resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/medias":{"get":{"operationId":"api_medias_get_collection","tags":["Media"],"responses":{"200":{"description":"Media collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media.jsonld-media_object.read"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media-media_object.read"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media-media_object.read"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media.jsonhal-media_object.read"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Media resources.","description":"Retrieves the collection of Media 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_medias_post","tags":["Media"],"responses":{"201":{"description":"Media resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonld-media_object.read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonhal-media_object.read"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Media resource.","description":"Creates a Media resource.","parameters":[],"requestBody":{"description":"","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false},"parameters":[]},"\/api\/medias\/{id}":{"get":{"operationId":"api_medias_id_get","tags":["Media"],"responses":{"200":{"description":"Media resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonld-media_object.read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonhal-media_object.read"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Media resource.","description":"Retrieves a Media 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},"parameters":[]},"\/api\/partners":{"get":{"operationId":"api_partners_get_collection","tags":["Partner"],"responses":{"200":{"description":"Partner collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Partner resources.","description":"Retrieves the collection of Partner 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false},{"name":"type","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"type[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false},{"name":"order[name]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false},{"name":"order[city]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false},{"name":"order[website]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_partners_post","tags":["Partner"],"responses":{"201":{"description":"Partner resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Partner resource.","description":"Creates a Partner resource.","parameters":[],"requestBody":{"description":"The new Partner resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/partners\/{id}":{"get":{"operationId":"api_partners_id_get","tags":["Partner"],"responses":{"200":{"description":"Partner resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Partner resource.","description":"Retrieves a Partner resource.","parameters":[{"name":"id","in":"path","description":"PartnerApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_partners_id_delete","tags":["Partner"],"responses":{"204":{"description":"Partner resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Partner resource.","description":"Removes the Partner resource.","parameters":[{"name":"id","in":"path","description":"PartnerApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_partners_id_patch","tags":["Partner"],"responses":{"200":{"description":"Partner resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Partner resource.","description":"Updates the Partner resource.","parameters":[{"name":"id","in":"path","description":"PartnerApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Partner resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/posts":{"get":{"operationId":"api_posts_get_collection","tags":["Post"],"responses":{"200":{"description":"Post collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Post resources.","description":"Retrieves the collection of Post 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false},{"name":"partner","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"partner[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false},{"name":"contact","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"contact[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_posts_post","tags":["Post"],"responses":{"201":{"description":"Post resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Post resource.","description":"Creates a Post resource.","parameters":[],"requestBody":{"description":"The new Post resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld-posting_create"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post-posting_create"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post-posting_create"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal-posting_create"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/posts\/{id}":{"get":{"operationId":"api_posts_id_get","tags":["Post"],"responses":{"200":{"description":"Post resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Post resource.","description":"Retrieves a Post resource.","parameters":[{"name":"id","in":"path","description":"PostingApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_posts_id_delete","tags":["Post"],"responses":{"204":{"description":"Post resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Post resource.","description":"Removes the Post resource.","parameters":[{"name":"id","in":"path","description":"PostingApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_posts_id_patch","tags":["Post"],"responses":{"200":{"description":"Post resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Post resource.","description":"Updates the Post resource.","parameters":[{"name":"id","in":"path","description":"PostingApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Post resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Post-posting_patch"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/User"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/User"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"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":10,"minimum":0,"maximum":50},"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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}},"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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"UserApi 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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}},"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":"UserApi 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},"parameters":[]},"\/auth":{"post":{"operationId":"login_check_post","tags":["Login Check"],"responses":{"200":{"description":"User token created","content":{"application\/json":{"schema":{"type":"object","properties":{"token":{"readOnly":true,"type":"string","nullable":false}},"required":["token"]}}}}},"summary":"Creates a user token.","description":"Creates a user token.","requestBody":{"description":"The login data","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","password"]}}},"required":true}},"parameters":[]}},"components":{"schemas":{"Comment":{"type":"object","description":"","deprecated":false,"required":["message"],"properties":{"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"post":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Comment.jsonhal":{"type":"object","description":"","deprecated":false,"required":["message"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"post":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Comment.jsonld":{"type":"object","description":"","deprecated":false,"required":["message"],"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"},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"post":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Contact":{"type":"object","description":"","deprecated":false,"required":["firstName","lastName","partner"],"properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"birthday":{"type":["string","null"],"format":"date-time"},"image":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"position":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Contact.jsonhal":{"type":"object","description":"","deprecated":false,"required":["firstName","lastName","partner"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"birthday":{"type":["string","null"],"format":"date-time"},"image":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"position":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Contact.jsonld":{"type":"object","description":"","deprecated":false,"required":["firstName","lastName","partner"],"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"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"birthday":{"type":["string","null"],"format":"date-time"},"image":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"position":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Media-media_object.read":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"Media.jsonhal-media_object.read":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"Media.jsonld-media_object.read":{"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"},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"Partner":{"type":"object","description":"","deprecated":false,"required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["customer","supplier","service"]},"street":{"type":["string","null"]},"streetNo":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"logo":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"logoUrl":{"readOnly":true,"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"contacts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Partner.jsonhal":{"type":"object","description":"","deprecated":false,"required":["name","type"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"name":{"type":"string"},"type":{"type":"string","enum":["customer","supplier","service"]},"street":{"type":["string","null"]},"streetNo":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"logo":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"logoUrl":{"readOnly":true,"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"contacts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Partner.jsonld":{"type":"object","description":"","deprecated":false,"required":["name","type"],"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"},"name":{"type":"string"},"type":{"type":"string","enum":["customer","supplier","service"]},"street":{"type":["string","null"]},"streetNo":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"logo":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"logoUrl":{"readOnly":true,"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"contacts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Post":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"comments":{"readOnly":true,"type":"array","items":{"$ref":"#\/components\/schemas\/Comment"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Post-posting_create":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"}}},"Post-posting_patch":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]}}},"Post.jsonhal":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"comments":{"readOnly":true,"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Post.jsonhal-posting_create":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"}}},"Post.jsonld":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"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"},"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"comments":{"readOnly":true,"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Post.jsonld-posting_create":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"}}},"User":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"User.jsonhal":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"User.jsonld":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"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"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[]} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Matsen API Platform","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/comments":{"get":{"operationId":"api_comments_get_collection","tags":["Comment"],"responses":{"200":{"description":"Comment collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Comment resources.","description":"Retrieves the collection of Comment 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_comments_post","tags":["Comment"],"responses":{"201":{"description":"Comment resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Comment resource.","description":"Creates a Comment resource.","parameters":[],"requestBody":{"description":"The new Comment resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/comments\/{id}":{"get":{"operationId":"api_comments_id_get","tags":["Comment"],"responses":{"200":{"description":"Comment resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Comment resource.","description":"Retrieves a Comment resource.","parameters":[{"name":"id","in":"path","description":"CommentApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_comments_id_delete","tags":["Comment"],"responses":{"204":{"description":"Comment resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Comment resource.","description":"Removes the Comment resource.","parameters":[{"name":"id","in":"path","description":"CommentApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_comments_id_patch","tags":["Comment"],"responses":{"200":{"description":"Comment resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Comment"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Comment resource.","description":"Updates the Comment resource.","parameters":[{"name":"id","in":"path","description":"CommentApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Comment resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Comment"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/contacts":{"get":{"operationId":"api_contacts_get_collection","tags":["Contact"],"responses":{"200":{"description":"Contact collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Contact resources.","description":"Retrieves the collection of Contact 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false},{"name":"partner","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"partner[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_contacts_post","tags":["Contact"],"responses":{"201":{"description":"Contact resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Contact resource.","description":"Creates a Contact resource.","parameters":[],"requestBody":{"description":"The new Contact resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/contacts\/{id}":{"get":{"operationId":"api_contacts_id_get","tags":["Contact"],"responses":{"200":{"description":"Contact resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Contact resource.","description":"Retrieves a Contact resource.","parameters":[{"name":"id","in":"path","description":"ContactApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_contacts_id_delete","tags":["Contact"],"responses":{"204":{"description":"Contact resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Contact resource.","description":"Removes the Contact resource.","parameters":[{"name":"id","in":"path","description":"ContactApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_contacts_id_patch","tags":["Contact"],"responses":{"200":{"description":"Contact resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Contact"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Contact.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Contact resource.","description":"Updates the Contact resource.","parameters":[{"name":"id","in":"path","description":"ContactApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Contact resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Contact"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/medias":{"get":{"operationId":"api_medias_get_collection","tags":["Media"],"responses":{"200":{"description":"Media collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media.jsonld-media_object.read"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media-media_object.read"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media-media_object.read"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Media.jsonhal-media_object.read"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Media resources.","description":"Retrieves the collection of Media 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_medias_post","tags":["Media"],"responses":{"201":{"description":"Media resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonld-media_object.read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonhal-media_object.read"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Media resource.","description":"Creates a Media resource.","parameters":[],"requestBody":{"description":"","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false},"parameters":[]},"\/api\/medias\/{id}":{"get":{"operationId":"api_medias_id_get","tags":["Media"],"responses":{"200":{"description":"Media resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonld-media_object.read"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Media-media_object.read"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Media.jsonhal-media_object.read"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Media resource.","description":"Retrieves a Media 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_medias_id_delete","tags":["Media"],"responses":{"204":{"description":"Media resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Media resource.","description":"Removes the Media 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},"parameters":[]},"\/api\/partners":{"get":{"operationId":"api_partners_get_collection","tags":["Partner"],"responses":{"200":{"description":"Partner collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Partner resources.","description":"Retrieves the collection of Partner 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false},{"name":"type","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"type[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false},{"name":"order[name]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false},{"name":"order[city]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false},{"name":"order[website]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_partners_post","tags":["Partner"],"responses":{"201":{"description":"Partner resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Partner resource.","description":"Creates a Partner resource.","parameters":[],"requestBody":{"description":"The new Partner resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/partners\/{id}":{"get":{"operationId":"api_partners_id_get","tags":["Partner"],"responses":{"200":{"description":"Partner resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Partner resource.","description":"Retrieves a Partner resource.","parameters":[{"name":"id","in":"path","description":"PartnerApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_partners_id_delete","tags":["Partner"],"responses":{"204":{"description":"Partner resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Partner resource.","description":"Removes the Partner resource.","parameters":[{"name":"id","in":"path","description":"PartnerApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_partners_id_patch","tags":["Partner"],"responses":{"200":{"description":"Partner resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Partner"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Partner.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Partner resource.","description":"Updates the Partner resource.","parameters":[{"name":"id","in":"path","description":"PartnerApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Partner resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Partner"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/posts":{"get":{"operationId":"api_posts_get_collection","tags":["Post"],"responses":{"200":{"description":"Post collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/Post.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"summary":"Retrieves the collection of Post resources.","description":"Retrieves the collection of Post 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":10,"minimum":0,"maximum":50},"style":"form","explode":false,"allowReserved":false},{"name":"partner","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"partner[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false},{"name":"contact","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"contact[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_posts_post","tags":["Post"],"responses":{"201":{"description":"Post resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Post resource.","description":"Creates a Post resource.","parameters":[],"requestBody":{"description":"The new Post resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld-posting_create"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post-posting_create"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post-posting_create"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal-posting_create"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/posts\/{id}":{"get":{"operationId":"api_posts_id_get","tags":["Post"],"responses":{"200":{"description":"Post resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Post resource.","description":"Retrieves a Post resource.","parameters":[{"name":"id","in":"path","description":"PostingApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_posts_id_delete","tags":["Post"],"responses":{"204":{"description":"Post resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Post resource.","description":"Removes the Post resource.","parameters":[{"name":"id","in":"path","description":"PostingApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_posts_id_patch","tags":["Post"],"responses":{"200":{"description":"Post resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonld"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/Post"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/Post.jsonhal"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Post resource.","description":"Updates the Post resource.","parameters":[{"name":"id","in":"path","description":"PostingApi identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Post resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Post-posting_patch"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"hydra:member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonld"}},"hydra:totalItems":{"type":"integer","minimum":0},"hydra:view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"hydra:first":{"type":"string","format":"iri-reference"},"hydra:last":{"type":"string","format":"iri-reference"},"hydra:previous":{"type":"string","format":"iri-reference"},"hydra:next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","hydra:first":"string","hydra:last":"string","hydra:previous":"string","hydra:next":"string"}},"hydra:search":{"type":"object","properties":{"@type":{"type":"string"},"hydra:template":{"type":"string"},"hydra:variableRepresentation":{"type":"string"},"hydra:mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["hydra:member"]}},"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/User"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/User"}}},"application\/hal+json":{"schema":{"type":"object","properties":{"_embedded":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonhal"}},"totalItems":{"type":"integer","minimum":0},"itemsPerPage":{"type":"integer","minimum":0},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"first":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"last":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"next":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}},"previous":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}}},"required":["_links","_embedded"]}}}}},"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":10,"minimum":0,"maximum":50},"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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}},"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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}},"required":true},"deprecated":false},"parameters":[]},"\/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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"UserApi 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"}},"application\/json":{"schema":{"$ref":"#\/components\/schemas\/User"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/User"}},"application\/hal+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonhal"}}},"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":"UserApi 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},"parameters":[]},"\/auth":{"post":{"operationId":"login_check_post","tags":["Login Check"],"responses":{"200":{"description":"User token created","content":{"application\/json":{"schema":{"type":"object","properties":{"token":{"readOnly":true,"type":"string","nullable":false}},"required":["token"]}}}}},"summary":"Creates a user token.","description":"Creates a user token.","requestBody":{"description":"The login data","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","password"]}}},"required":true}},"parameters":[]}},"components":{"schemas":{"Comment":{"type":"object","description":"","deprecated":false,"required":["message"],"properties":{"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"post":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Comment.jsonhal":{"type":"object","description":"","deprecated":false,"required":["message"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"post":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Comment.jsonld":{"type":"object","description":"","deprecated":false,"required":["message"],"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"},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"post":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Contact":{"type":"object","description":"","deprecated":false,"required":["firstName","lastName","partner"],"properties":{"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"birthday":{"type":["string","null"],"format":"date-time"},"image":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"position":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Contact.jsonhal":{"type":"object","description":"","deprecated":false,"required":["firstName","lastName","partner"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"birthday":{"type":["string","null"],"format":"date-time"},"image":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"position":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Contact.jsonld":{"type":"object","description":"","deprecated":false,"required":["firstName","lastName","partner"],"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"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"birthday":{"type":["string","null"],"format":"date-time"},"image":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"position":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Media-media_object.read":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"Media.jsonhal-media_object.read":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"Media.jsonld-media_object.read":{"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"},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"Partner":{"type":"object","description":"","deprecated":false,"required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["customer","supplier","service"]},"street":{"type":["string","null"]},"streetNo":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"logo":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"logoUrl":{"readOnly":true,"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"contacts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Partner.jsonhal":{"type":"object","description":"","deprecated":false,"required":["name","type"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"name":{"type":"string"},"type":{"type":"string","enum":["customer","supplier","service"]},"street":{"type":["string","null"]},"streetNo":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"logo":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"logoUrl":{"readOnly":true,"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"contacts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Partner.jsonld":{"type":"object","description":"","deprecated":false,"required":["name","type"],"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"},"name":{"type":"string"},"type":{"type":"string","enum":["customer","supplier","service"]},"street":{"type":["string","null"]},"streetNo":{"type":["string","null"]},"zip":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"website":{"type":["string","null"]},"logo":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"logoUrl":{"readOnly":true,"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"contacts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}}}},"Post":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"comments":{"readOnly":true,"type":"array","items":{"$ref":"#\/components\/schemas\/Comment"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Post-posting_create":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"}}},"Post-posting_patch":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]}}},"Post.jsonhal":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"comments":{"readOnly":true,"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonhal"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Post.jsonhal-posting_create":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"}}},"Post.jsonld":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"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"},"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"owner":{"readOnly":true,"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"ownerName":{"readOnly":true,"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"comments":{"readOnly":true,"type":"array","items":{"$ref":"#\/components\/schemas\/Comment.jsonld"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Post.jsonld-posting_create":{"type":"object","description":"","deprecated":false,"required":["headline","message"],"properties":{"headline":{"type":["string","null"]},"message":{"type":["string","null"]},"partner":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"contact":{"owl:maxCardinality":1,"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"}}},"User":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"User.jsonhal":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","format":"iri-reference"}}}}},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"User.jsonld":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"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"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"posts":{"readOnly":true,"type":"array","items":{"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"}},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[]} \ No newline at end of file diff --git a/matsen-tool/openapi.yaml b/matsen-tool/openapi.yaml index 5e0c85c..805cb59 100644 --- a/matsen-tool/openapi.yaml +++ b/matsen-tool/openapi.yaml @@ -652,6 +652,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_medias_id_delete + tags: + - Media + responses: + 204: + description: 'Media resource deleted' + 404: + description: 'Resource not found' + summary: 'Removes the Media resource.' + description: 'Removes the Media 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 parameters: [] /api/partners: get: diff --git a/matsen-tool/src/app/_helpers/formgroup.initializer.ts b/matsen-tool/src/app/_helpers/formgroup.initializer.ts new file mode 100644 index 0000000..b308ee1 --- /dev/null +++ b/matsen-tool/src/app/_helpers/formgroup.initializer.ts @@ -0,0 +1,12 @@ +import {FormGroup} from "@angular/forms"; + +export class FormGroupInitializer { + public static initFormGroup(formGroup: FormGroup, model: any) { + for (const controlName in formGroup.controls) { + if (formGroup.controls.hasOwnProperty(controlName)) { + formGroup.patchValue({[controlName]: model[controlName] ?? null}); + } + } + return formGroup; + } +} \ No newline at end of file diff --git a/matsen-tool/src/app/_helpers/modal.states.ts b/matsen-tool/src/app/_helpers/modal.states.ts new file mode 100644 index 0000000..31a5f71 --- /dev/null +++ b/matsen-tool/src/app/_helpers/modal.states.ts @@ -0,0 +1,4 @@ +export enum ModalStatus { + Cancelled = 'Cancelled', + Submitted = 'Submitted' +} \ No newline at end of file diff --git a/matsen-tool/src/app/_interfaces/modalContent.ts b/matsen-tool/src/app/_interfaces/modalContent.ts index 7d7bb13..5155948 100644 --- a/matsen-tool/src/app/_interfaces/modalContent.ts +++ b/matsen-tool/src/app/_interfaces/modalContent.ts @@ -1,3 +1,3 @@ export interface ModalContent { - partner: any; + contact: any; } \ No newline at end of file diff --git a/matsen-tool/src/app/app.component.scss b/matsen-tool/src/app/app.component.scss index 3a73578..75feef5 100644 --- a/matsen-tool/src/app/app.component.scss +++ b/matsen-tool/src/app/app.component.scss @@ -1,21 +1,3 @@ img { width: 247px; } - -::ng-deep { - .modal-content { - padding: 1rem; - } - .modal-dialog { - &:before { - content: ""; - display: block; - background: #fff; - width: 30px; - height: 30px; - position: absolute; - right: -30px; - top: -30px; - } - } -} \ No newline at end of file diff --git a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html index d8c79a2..88b27ba 100644 --- a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html +++ b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.html @@ -1,5 +1,5 @@
-
+

{{ contact.firstName }} {{ contact.lastName }}

@@ -18,6 +18,7 @@ height="94" alt="{{contact.firstName}} {{contact.lastName}}" title="{{contact.firstName}} {{contact.lastName}}"/>
+
diff --git a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts index 07116da..bdaa624 100644 --- a/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts +++ b/matsen-tool/src/app/contacts/contacts-detail/contacts-detail.component.ts @@ -1,6 +1,6 @@ import {AfterViewInit, ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core'; import {environment} from "@environments/environment"; -import {ContactJsonld, ContactService, PostJsonld, PostService} from "@app/core/api/v1"; +import {ContactJsonld, ContactService, PartnerJsonld, PostJsonld, PostService} from "@app/core/api/v1"; import {Subscription} from "rxjs"; import {ActivatedRoute} from "@angular/router"; import {MatPaginator, MatPaginatorIntl, PageEvent} from "@angular/material/paginator"; @@ -8,6 +8,8 @@ import {MatTableDataSource} from "@angular/material/table"; import {NewPostingComponent} from "@app/postings/new-posting/new-posting.component"; import {ModalComponent} from "@app/_components/modal/modal.component"; import {NgbModal} from "@ng-bootstrap/ng-bootstrap"; +import {NewContactComponent} from "@app/contacts/new-contact/new-contact.component"; +import {ModalStatus} from "@app/_helpers/modal.states"; @Component({ selector: 'app-contacts-detail', @@ -70,6 +72,7 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { ).subscribe( data => { this.contact = data; + console.log(this.contact); } ); } @@ -103,4 +106,14 @@ export class ContactsDetailComponent implements OnInit, AfterViewInit { const modalRef = this.modalService.open(ModalComponent); modalRef.componentInstance.dynamicComponent = NewPostingComponent; } + + openModalEditContact() { + const modalRef = this.modalService.open(NewContactComponent); + modalRef.componentInstance.contact = this.contact; + modalRef.componentInstance.submit.subscribe((modalStatus: ModalStatus) => { + if (modalStatus === ModalStatus.Submitted) { + modalRef.dismiss(); + } + }); + } } diff --git a/matsen-tool/src/app/contacts/new-contact/new-contact.component.html b/matsen-tool/src/app/contacts/new-contact/new-contact.component.html index 25ab3a5..c942c18 100644 --- a/matsen-tool/src/app/contacts/new-contact/new-contact.component.html +++ b/matsen-tool/src/app/contacts/new-contact/new-contact.component.html @@ -18,12 +18,12 @@
- - + +
- +
@@ -36,7 +36,7 @@
- +
diff --git a/matsen-tool/src/app/contacts/new-contact/new-contact.component.ts b/matsen-tool/src/app/contacts/new-contact/new-contact.component.ts index 5dc8946..f3f17a8 100644 --- a/matsen-tool/src/app/contacts/new-contact/new-contact.component.ts +++ b/matsen-tool/src/app/contacts/new-contact/new-contact.component.ts @@ -1,9 +1,11 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; import {FormGroup} from "@angular/forms"; import {contactForm} from "@app/_forms/apiForms"; -import {ContactJsonld, ContactService, PartnerJsonld} from "@app/core/api/v1"; +import {ContactJsonld, ContactService, MediaService, PartnerJsonld} from "@app/core/api/v1"; import {Subscription} from "rxjs"; import {ModalContent} from "@app/_interfaces/modalContent"; +import {ModalStatus} from "@app/_helpers/modal.states"; +import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer"; @Component({ @@ -13,49 +15,62 @@ import {ModalContent} from "@app/_interfaces/modalContent"; }) export class NewContactComponent implements ModalContent, OnInit { - @Input() public partner!: PartnerJsonld; - @Output() public submit: EventEmitter = new EventEmitter(); + @Input() public contact!: ContactJsonld; + @Output() public submit: EventEmitter = new EventEmitter(); protected contactForm: FormGroup; protected selectedImage: File | null; protected contactSub: Subscription; + protected mediaSub: Subscription; constructor( private contactService: ContactService, + private mediaService: MediaService ) { this.contactForm = contactForm; this.selectedImage = null; this.contactSub = new Subscription(); + this.mediaSub = new Subscription(); } ngOnInit(): void { - console.log(this.partner.id); - this.contactForm.patchValue({"partner": this.partner}); + this.contactForm = FormGroupInitializer.initFormGroup(this.contactForm, this.contact); + console.log(this.contactForm); } + // On submit form: Check if image is set onSubmit() { - if (this.contactForm.valid) { - // Hier können Sie die Daten senden oder weitere Aktionen durchführen - console.log(this.selectedImage); - console.log('Formular wurde gesendet:', this.contactForm.value); - - let newContact: ContactJsonld = this.contactForm.value as ContactJsonld; - newContact.posts = []; - - // this.submit.emit("HALLO DANIEL"); + if (this.selectedImage !== null) { + this.mediaSub = this.mediaService.mediasPost( + this.selectedImage + ).subscribe( + data => { + this.contactForm.patchValue({"image": data.id}); + this.submitForm(); + } + ); + } else { + this.submitForm(); + } + } + // Submit all values of the form to the backend + submitForm() { + console.log(this.contactForm.value as ContactJsonld); + if (this.contactForm.valid) { this.contactSub = this.contactService.contactsPost( this.contactForm.value as ContactJsonld ).subscribe( data => { - console.log(data); - this.submit.emit("HALLO DANIEL"); + this.contactForm.reset(); + this.submit.emit(ModalStatus.Submitted); } ); } } + // If file is selected, convert it onFileSelected(event: any) { const file: File = event.target.files[0]; if (file) { diff --git a/matsen-tool/src/app/core/api/v1/api/media.service.ts b/matsen-tool/src/app/core/api/v1/api/media.service.ts index 433919c..34ba30b 100644 --- a/matsen-tool/src/app/core/api/v1/api/media.service.ts +++ b/matsen-tool/src/app/core/api/v1/api/media.service.ts @@ -196,6 +196,77 @@ export class MediaService { ); } + /** + * Removes the Media resource. + * Removes the Media resource. + * @param id MediaObject identifier + * @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 mediasIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public mediasIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public mediasIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public mediasIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling mediasIdDelete.'); + } + + 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[] = [ + ]; + 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; + } + + + 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/medias/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a Media resource. * Retrieves a Media resource. diff --git a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts index 2ea1b5a..8d63051 100644 --- a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts +++ b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts @@ -4,14 +4,14 @@ import {ModalComponent} from "@app/_components/modal/modal.component"; import {NewContactComponent} from "@app/contacts/new-contact/new-contact.component"; import {ActivatedRoute, Router} from "@angular/router"; import {ContactJsonld, ContactService, PartnerJsonld, PartnerService, PostJsonld, PostService} from "@app/core/api/v1"; -import {Subject, Subscription} from "rxjs"; +import {Subscription} from "rxjs"; import {environment} from "@environments/environment"; import {ApiConverter} from "@app/_helpers/api.converter"; import {MatPaginator, MatPaginatorIntl, PageEvent} from "@angular/material/paginator"; import {MatTableDataSource} from "@angular/material/table"; import {NewPostingComponent} from "@app/postings/new-posting/new-posting.component"; import {NewTaskComponent} from "@app/tasks/new-task/new-task.component"; -import {NewPartnerComponent} from "@app/partners/new-partner/new-partner.component"; +import {ModalStatus} from "@app/_helpers/modal.states"; @Component({ selector: 'app-partners-detail', @@ -37,7 +37,6 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { protected contactsPageSize: number; protected contactsPageIndex: number; - //protected posts: Array; protected tasksDataSource; protected tasksLength: number; protected tasksPageEvent: PageEvent; @@ -94,26 +93,6 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { this.postsPageIndex = 0; } - openModalNewContact() { - const modalRef = this.modalService.open(NewContactComponent); - modalRef.componentInstance.partner = this.partner; - modalRef.componentInstance.submit.subscribe(($e: any) => { - console.log($e); - this.modalService.dismissAll(); - }); - } - - openModalNewPosting() { - const modalRef = this.modalService.open(ModalComponent); - modalRef.componentInstance.dynamicComponent = NewPostingComponent; - - } - - openModalNewTask() { - const modalRef = this.modalService.open(ModalComponent); - modalRef.componentInstance.dynamicComponent = NewTaskComponent; - } - ngOnInit() { this.route.params.subscribe(params => { this.id = params['id']; @@ -196,4 +175,29 @@ export class PartnersDetailComponent implements OnInit, AfterViewInit { console.log(ApiConverter.extractId(contact.id)); this.router.navigate(['/contacts', ApiConverter.extractId(contact.id)]); } + + openModalNewContact() { + const modalRef = this.modalService.open(NewContactComponent); + let contact: ContactJsonld = {} as ContactJsonld; + contact.partner = this.partner.id ?? null; + modalRef.componentInstance.contact = contact; + modalRef.componentInstance.submit.subscribe((modalStatus: ModalStatus) => { + if (modalStatus === ModalStatus.Submitted) { + modalRef.dismiss(); + } + }); + } + + openModalNewPosting() { + // TODO + const modalRef = this.modalService.open(ModalComponent); + modalRef.componentInstance.dynamicComponent = NewPostingComponent; + + } + + openModalNewTask() { + // TODO + const modalRef = this.modalService.open(ModalComponent); + modalRef.componentInstance.dynamicComponent = NewTaskComponent; + } } diff --git a/matsen-tool/src/styles.scss b/matsen-tool/src/styles.scss index fab10c0..9e56f0f 100644 --- a/matsen-tool/src/styles.scss +++ b/matsen-tool/src/styles.scss @@ -29,20 +29,37 @@ body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } .importance { } +} - [data-type="user-tool"] { - cursor: pointer; - font-size: 20px; - @include transition(); +[data-type="user-tool"] { + cursor: pointer; + font-size: 20px; + @include transition(); - &:hover { - color: green; - } + &:hover { + color: green; } +} - [data-action="edit"] { - right: 0; - bottom: 0; +[data-action="edit"] { + right: 0; + bottom: 0; + width: auto; +} + +.modal-content { + padding: 1rem; +} +.modal-dialog { + &:before { + content: ""; + display: block; + background: #fff; + width: 30px; + height: 30px; + position: absolute; + right: -30px; + top: -30px; } }