Skip to content

Commit

Permalink
🐛 [Open API] Added documentation for new serviceConfigurationUpdateFo…
Browse files Browse the repository at this point in the history
…rbiddenExceptionInfo response

Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
  • Loading branch information
Coduz committed Feb 20, 2025
1 parent 0bd2a79 commit 04bb621
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
2 changes: 2 additions & 0 deletions rest-api/resources/src/main/resources/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,8 @@ components:
$ref: './serviceConfiguration/serviceConfiguration.yaml#/components/schemas/option'
serviceAttributeDefinition:
$ref: './serviceConfiguration/serviceConfiguration.yaml#/components/schemas/attributeDefinition'
serviceConfigurationUpdateForbiddenExceptionInfo:
$ref: './serviceConfiguration/serviceConfiguration.yaml#/components/schemas/serviceConfigurationUpdateForbiddenExceptionInfo'
### System Info Entities ###
systemInfo:
$ref: './systemInfo/systemInfo.yaml#/components/schemas/systemInfo'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ paths:
401:
$ref: '../openapi.yaml#/components/responses/unauthenticated'
403:
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized'
description: The requested update is forbidden
content:
application/json:
schema:
oneOf:
- $ref: '../openapi.yaml#/components/schemas/subjectUnauthorizedExceptionInfo'
- $ref: './serviceConfiguration.yaml#/components/schemas/serviceConfigurationUpdateForbiddenExceptionInfo'
application/xml:
schema:
oneOf:
- $ref: '../openapi.yaml#/components/schemas/subjectUnauthorizedExceptionInfo'
- $ref: './serviceConfiguration.yaml#/components/schemas/serviceConfigurationUpdateForbiddenExceptionInfo'
xml:
name: 'serviceConfigurationUpdateForbiddenExceptionInfo'
404:
$ref: '../openapi.yaml#/components/responses/entityNotFound'
500:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,20 @@ paths:
401:
$ref: '../openapi.yaml#/components/responses/unauthenticated'
403:
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized'
description: The requested update is forbidden
content:
application/json:
schema:
oneOf:
- $ref: '../openapi.yaml#/components/schemas/subjectUnauthorizedExceptionInfo'
- $ref: './serviceConfiguration.yaml#/components/schemas/serviceConfigurationUpdateForbiddenExceptionInfo'
application/xml:
schema:
oneOf:
- $ref: '../openapi.yaml#/components/schemas/subjectUnauthorizedExceptionInfo'
- $ref: './serviceConfiguration.yaml#/components/schemas/serviceConfigurationUpdateForbiddenExceptionInfo'
xml:
name: 'serviceConfigurationUpdateForbiddenExceptionInfo'
404:
$ref: '../openapi.yaml#/components/responses/entityNotFound'
500:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,30 @@ components:
size:
type: integer

### Exception Info
serviceConfigurationUpdateForbiddenExceptionInfo:
description: The update of the configuration for the service contains an update to a property than cannot be updated
allOf:
- $ref: '../openapi.yaml#/components/schemas/exceptionInfo'
- properties:
scopeId:
description: The scope for which the update is forbidden
$ref: '../openapi.yaml#/components/schemas/kapuaId'
servicePid:
type: string
description: The Pid of the service
propertyId:
type: string
description: The property id for which the update is forbidden.
propertyValue:
type: string
description: The property value for which the update is forbidden.
example:
type: "serviceConfigurationUpdateForbiddenExceptionInfo"
httpErrorCode: 403
message: "Current User cannot update property maxNumberChildEntities of ServiceComponentConfiguration org.eclipse.kapua.service.account.AccountService of Account 2 with value 10"
kapuaErrorCode: "UPDATE_PROPERTY_FORBIDDEN"
scopeId: 2
servicePid: "org.eclipse.kapua.service.account.AccountService"
propertyId: "maxNumberChildEntities"
propertyValue: "10"

0 comments on commit 04bb621

Please sign in to comment.