diff --git a/rest-api/resources/src/main/resources/openapi/openapi.yaml b/rest-api/resources/src/main/resources/openapi/openapi.yaml index d45ca00e92b..bdb8e782076 100644 --- a/rest-api/resources/src/main/resources/openapi/openapi.yaml +++ b/rest-api/resources/src/main/resources/openapi/openapi.yaml @@ -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' diff --git a/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId-componentId.yaml b/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId-componentId.yaml index 93472e4ed39..8eace852e19 100644 --- a/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId-componentId.yaml +++ b/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId-componentId.yaml @@ -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: diff --git a/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId.yaml b/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId.yaml index 5c33aa4bb73..e50712d573b 100644 --- a/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId.yaml +++ b/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration-scopeId.yaml @@ -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: diff --git a/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration.yaml b/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration.yaml index e33d9ee9da1..14c84b7729e 100644 --- a/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration.yaml +++ b/rest-api/resources/src/main/resources/openapi/serviceConfiguration/serviceConfiguration.yaml @@ -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"