-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from CaritasDeutschland/get-consultants-admin-api
Get consultants admin api
- Loading branch information
Showing
51 changed files
with
1,681 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,16 +34,7 @@ paths: | |
description: 'The filter parameters to search for. If no filter is set all sessions are | ||
being returned. If more than one filter is set the first given filter is used only.' | ||
schema: | ||
type: object | ||
properties: | ||
agency: | ||
type: integer | ||
asker: | ||
type: string | ||
consultant: | ||
type: string | ||
consultingType: | ||
type: integer | ||
$ref: '#/components/schemas/SessionFilter' | ||
- name: page | ||
in: query | ||
description: Number of page where to start in the query (1 = first page) | ||
|
@@ -71,6 +62,159 @@ paths: | |
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [ ] | ||
/useradmin/consultant: | ||
post: | ||
tags: | ||
- admin-user-controller | ||
summary: 'Creates a new consultant [Authorization: Role: consultant-admin]' | ||
operationId: createConsultant | ||
requestBody: | ||
content: | ||
'application/json': | ||
schema: | ||
$ref: '#/components/schemas/CreateConsultantDTO' | ||
required: true | ||
responses: | ||
201: | ||
description: CREATED - consultant was created successfully | ||
content: | ||
'application/hal+json': | ||
schema: | ||
$ref: '#/components/schemas/CreateConsultantResponseDTO' | ||
400: | ||
description: BAD REQUEST - invalid/incomplete request or body object | ||
401: | ||
description: UNAUTHORIZED - no/invalid role/authorization | ||
500: | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [ ] | ||
/useradmin/consultant/{consultantId}: | ||
get: | ||
tags: | ||
- admin-user-controller | ||
summary: 'Get a consultant by given id [Authorization: Role: consultant-admin]' | ||
operationId: getConsultant | ||
parameters: | ||
- name: consultantId | ||
in: path | ||
description: consultant id | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
200: | ||
description: OK - consultant found | ||
content: | ||
'application/json': | ||
schema: | ||
$ref: '#/components/schemas/GetConsultantResponseDTO' | ||
204: | ||
description: NO CONTENT - consultant with the specific id was not found | ||
400: | ||
description: BAD REQUEST - invalid/incomplete request | ||
401: | ||
description: UNAUTHORIZED - no/invalid role/authorization | ||
500: | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [ ] | ||
put: | ||
tags: | ||
- admin-user-controller | ||
summary: 'Updates a consultant [Authorization: Role: consultant-admin]' | ||
operationId: updateConsultant | ||
requestBody: | ||
content: | ||
'application/hal+json': | ||
schema: | ||
$ref: '#/components/schemas/UpdateConsultantDTO' | ||
required: true | ||
parameters: | ||
- name: consultantId | ||
in: path | ||
description: consultant id | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
200: | ||
description: OK - consultant was updated successfully | ||
content: | ||
'application/json': | ||
schema: | ||
$ref: '#/components/schemas/UpdateConsultantResponseDTO' | ||
400: | ||
description: BAD REQUEST - invalid/incomplete request | ||
401: | ||
description: UNAUTHORIZED - no/invalid role/authorization | ||
500: | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [ ] | ||
delete: | ||
tags: | ||
- admin-user-controller | ||
summary: 'Mark a consultant for deletion [Authorization: Role: consultant-admin]' | ||
operationId: markConsultantForDeletion | ||
parameters: | ||
- name: consultantId | ||
in: path | ||
description: consultant id | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
200: | ||
description: OK - consultant was marked for deletion successfully | ||
400: | ||
description: BAD REQUEST - invalid/incomplete request | ||
401: | ||
description: UNAUTHORIZED - no/invalid role/authorization | ||
500: | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [ ] | ||
/useradmin/consultants: | ||
get: | ||
tags: | ||
- admin-user-controller | ||
summary: 'Returns the list of consultants by filter query parameter. [Authorization: Role: consultant-admin]' | ||
operationId: getConsultants | ||
parameters: | ||
- name: filter | ||
in: query | ||
description: 'The filter parameters to search for. If no filter is set all consultant are | ||
being returned.' | ||
schema: | ||
$ref: '#/components/schemas/ConsultantFilter' | ||
- name: page | ||
in: query | ||
description: Number of page where to start in the query (1 = first page) | ||
required: true | ||
schema: | ||
type: integer | ||
- name: perPage | ||
in: query | ||
description: Number of items which are being returned per page | ||
required: true | ||
schema: | ||
type: integer | ||
responses: | ||
200: | ||
description: OK - successfull operation | ||
content: | ||
'application/hal+json': | ||
schema: | ||
$ref: '#/components/schemas/ConsultantSearchResultDTO' | ||
400: | ||
description: BAD REQUEST - invalid/incomplete request or body object | ||
401: | ||
description: UNAUTHORIZED - no/invalid role/authorization | ||
500: | ||
description: INTERNAL SERVER ERROR - server encountered unexpected condition | ||
security: | ||
- Bearer: [ ] | ||
/useradmin/consultingtypes: | ||
get: | ||
tags: | ||
|
@@ -111,8 +255,7 @@ paths: | |
get: | ||
tags: | ||
- admin-user-controller | ||
summary: 'Returns an generated report containing data integration violations. [Authorization: | ||
Role: user-admin]' | ||
summary: 'Returns an generated report containing data integration violations. [Authorization: Role: user-admin]' | ||
operationId: generateViolationReport | ||
responses: | ||
200: | ||
|
@@ -148,6 +291,8 @@ components: | |
$ref: '#/components/schemas/HalLink' | ||
sessions: | ||
$ref: '#/components/schemas/HalLink' | ||
consultants: | ||
$ref: '#/components/schemas/HalLink' | ||
|
||
HalLink: | ||
type: object | ||
|
@@ -296,6 +441,199 @@ components: | |
type: boolean | ||
example: true | ||
|
||
CreateConsultantDTO: | ||
type: object | ||
required: | ||
- username | ||
- firstname | ||
- lastname | ||
- formalLanguage | ||
- absent | ||
properties: | ||
username: | ||
type: string | ||
example: "max.mustermann" | ||
firstname: | ||
type: string | ||
example: "Max" | ||
lastname: | ||
type: string | ||
example: "Mustermann" | ||
email: | ||
type: string | ||
example: "[email protected]" | ||
formalLanguage: | ||
type: boolean | ||
example: true | ||
absent: | ||
type: boolean | ||
example: true | ||
absenceMessage: | ||
type: string | ||
example: "I am absent until..." | ||
|
||
UpdateConsultantDTO: | ||
type: object | ||
required: | ||
- firstname | ||
- lastname | ||
- formalLanguage | ||
- absent | ||
properties: | ||
firstname: | ||
type: string | ||
example: "Max" | ||
lastname: | ||
type: string | ||
example: "Mustermann" | ||
email: | ||
type: string | ||
example: "[email protected]" | ||
formalLanguage: | ||
type: boolean | ||
example: true | ||
absent: | ||
type: boolean | ||
example: true | ||
absenceMessage: | ||
type: string | ||
example: "I am absent until..." | ||
|
||
ConsultantDTO: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
example: "0f2cca9c-9303-4791-a0a5-a1ce16f1524f" | ||
username: | ||
type: string | ||
example: "max.mustermann" | ||
firstname: | ||
type: string | ||
example: "Max" | ||
lastname: | ||
type: string | ||
example: "Mustermann" | ||
email: | ||
type: string | ||
example: "[email protected]" | ||
formalLanguage: | ||
type: boolean | ||
example: true | ||
teamConsultant: | ||
type: boolean | ||
example: false | ||
absent: | ||
type: boolean | ||
example: true | ||
absenceMessage: | ||
type: string | ||
example: "I am absent until..." | ||
createDate: | ||
type: string | ||
updateDate: | ||
type: string | ||
deleteDate: | ||
type: string | ||
|
||
CreateConsultantResponseDTO: | ||
type: object | ||
properties: | ||
_embedded: | ||
$ref: '#/components/schemas/ConsultantDTO' | ||
_links: | ||
$ref: '#/components/schemas/CreateLinks' | ||
|
||
GetConsultantResponseDTO: | ||
type: object | ||
properties: | ||
_embedded: | ||
$ref: '#/components/schemas/ConsultantDTO' | ||
_links: | ||
$ref: '#/components/schemas/GetLinks' | ||
|
||
UpdateConsultantResponseDTO: | ||
type: object | ||
properties: | ||
_embedded: | ||
$ref: '#/components/schemas/ConsultantDTO' | ||
_links: | ||
$ref: '#/components/schemas/UpdateLinks' | ||
|
||
ConsultantSearchResultDTO: | ||
type: object | ||
properties: | ||
_embedded: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ConsultantDTO' | ||
_links: | ||
$ref: '#/components/schemas/PaginationLinks' | ||
|
||
CreateLinks: | ||
type: object | ||
required: | ||
- self | ||
properties: | ||
self: | ||
$ref: '#/components/schemas/HalLink' | ||
update: | ||
$ref: '#/components/schemas/HalLink' | ||
delete: | ||
$ref: '#/components/schemas/HalLink' | ||
|
||
GetLinks: | ||
type: object | ||
required: | ||
- self | ||
properties: | ||
self: | ||
$ref: '#/components/schemas/HalLink' | ||
update: | ||
$ref: '#/components/schemas/HalLink' | ||
delete: | ||
$ref: '#/components/schemas/HalLink' | ||
|
||
UpdateLinks: | ||
type: object | ||
required: | ||
- self | ||
properties: | ||
self: | ||
$ref: '#/components/schemas/HalLink' | ||
consultant: | ||
$ref: '#/components/schemas/HalLink' | ||
delete: | ||
$ref: '#/components/schemas/HalLink' | ||
|
||
SessionFilter: | ||
type: object | ||
properties: | ||
agency: | ||
type: integer | ||
asker: | ||
type: string | ||
consultant: | ||
type: string | ||
consultingType: | ||
type: integer | ||
|
||
ConsultantFilter: | ||
type: object | ||
properties: | ||
username: | ||
type: string | ||
lastname: | ||
type: string | ||
email: | ||
type: string | ||
agencyId: | ||
type: integer | ||
absent: | ||
type: boolean | ||
|
||
ViolationDTO: | ||
type: object | ||
properties: | ||
|
Oops, something went wrong.