implements HsOfficeContactController
This commit is contained in:
@ -14,3 +14,5 @@ map:
|
||||
paths:
|
||||
/api/hs/office/partners/{partnerUUID}:
|
||||
null: org.openapitools.jackson.nullable.JsonNullable
|
||||
/api/hs/office/contacts/{contactUUID}:
|
||||
null: org.openapitools.jackson.nullable.JsonNullable
|
||||
|
@ -3,7 +3,22 @@ components:
|
||||
|
||||
schemas:
|
||||
|
||||
HsOfficeContactBase:
|
||||
HsOfficeContact:
|
||||
type: object
|
||||
properties:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
label:
|
||||
type: string
|
||||
postalAddress:
|
||||
type: string
|
||||
emailAddresses:
|
||||
type: string
|
||||
phoneNumbers:
|
||||
type: string
|
||||
|
||||
HsOfficeContactInsert:
|
||||
type: object
|
||||
properties:
|
||||
label:
|
||||
@ -14,15 +29,21 @@ components:
|
||||
type: string
|
||||
phoneNumbers:
|
||||
type: string
|
||||
required:
|
||||
- label
|
||||
|
||||
HsOfficeContact:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
- $ref: '#/components/schemas/HsOfficeContactBase'
|
||||
|
||||
HsOfficeContactUpdate:
|
||||
$ref: '#/components/schemas/HsOfficeContactBase'
|
||||
HsOfficeContactPatch:
|
||||
type: object
|
||||
properties:
|
||||
label:
|
||||
type: string
|
||||
nullable: true
|
||||
postalAddress:
|
||||
type: string
|
||||
nullable: true
|
||||
emailAddresses:
|
||||
type: string
|
||||
nullable: true
|
||||
phoneNumbers:
|
||||
type: string
|
||||
nullable: true
|
||||
|
@ -0,0 +1,83 @@
|
||||
get:
|
||||
tags:
|
||||
- hs-office-contacts
|
||||
description: 'Fetch a single business contact by its uuid, if visible for the current subject.'
|
||||
operationId: getContactByUuid
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
- name: contactUUID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID of the contact to fetch.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContact'
|
||||
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
|
||||
patch:
|
||||
tags:
|
||||
- hs-office-contacts
|
||||
description: 'Updates a single business contact by its uuid, if permitted for the current subject.'
|
||||
operationId: patchContact
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
- name: contactUUID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
requestBody:
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContactPatch'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContact'
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
|
||||
delete:
|
||||
tags:
|
||||
- hs-office-contacts
|
||||
description: 'Delete a single business contact by its uuid, if permitted for the current subject.'
|
||||
operationId: deleteContactByUuid
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
- name: contactUUID
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID of the contact to delete.
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
"404":
|
||||
$ref: './error-responses.yaml#/components/responses/NotFound'
|
@ -0,0 +1,56 @@
|
||||
get:
|
||||
summary: Returns a list of (optionally filtered) contacts.
|
||||
description: Returns the list of (optionally filtered) contacts which are visible to the current user or any of it's assumed roles.
|
||||
tags:
|
||||
- hs-office-contacts
|
||||
operationId: listContacts
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
- name: name
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Prefix of label to filter the results.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContact'
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
|
||||
post:
|
||||
summary: Adds a new contact.
|
||||
tags:
|
||||
- hs-office-contacts
|
||||
operationId: addContact
|
||||
parameters:
|
||||
- $ref: './auth.yaml#/components/parameters/currentUser'
|
||||
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
||||
requestBody:
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContactInsert'
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContact'
|
||||
"401":
|
||||
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
||||
"403":
|
||||
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
||||
"409":
|
||||
$ref: './error-responses.yaml#/components/responses/Conflict'
|
@ -12,7 +12,7 @@ get:
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Customer-prefix to filter the results. TODO
|
||||
description: Prefix of name properties from person or contact to filter the results.
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
|
@ -8,9 +8,20 @@ servers:
|
||||
|
||||
paths:
|
||||
|
||||
# Partners
|
||||
|
||||
/api/hs/office/partners:
|
||||
$ref: "./hs-office-partners.yaml"
|
||||
|
||||
/api/hs/office/partners/{partnerUUID}:
|
||||
$ref: "./hs-office-partners-with-uuid.yaml"
|
||||
|
||||
|
||||
# Contacts
|
||||
|
||||
/api/hs/office/contacts:
|
||||
$ref: "./hs-office-contacts.yaml"
|
||||
|
||||
/api/hs/office/contacts/{contactUUID}:
|
||||
$ref: "./hs-office-contacts-with-uuid.yaml"
|
||||
|
||||
|
Reference in New Issue
Block a user