Skip to content

Commit

Permalink
Remove unwanted error codes from branding preference api definition
Browse files Browse the repository at this point in the history
  • Loading branch information
UdeshAthukorala committed Oct 5, 2023
1 parent f15e2da commit 1758c62
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public Response deleteBrandingPreference( @Valid@ApiParam(value = "Type to fi
@ApiResponse(code = 400, message = "Invalid input in the request.", response = Error.class),
@ApiResponse(code = 401, message = "Authentication information is missing or invalid.", response = Void.class),
@ApiResponse(code = 403, message = "Access forbidden.", response = Void.class),
@ApiResponse(code = 404, message = "Requested resource is not found.", response = Error.class),
@ApiResponse(code = 500, message = "Internal server error.", response = Error.class)
})
public Response deleteCustomText( @Valid@ApiParam(value = "Type to filter the retrieval of customizations.", allowableValues="ORG, APP, CUSTOM", defaultValue="ORG") @DefaultValue("ORG") @QueryParam("type") String type, @Valid@ApiParam(value = "Tenant/Application name to filter the retrieval of customizations.") @QueryParam("name") String name, @Valid@ApiParam(value = "Locale to filter the retrieval of customizations.", defaultValue="en-US") @DefaultValue("en-US") @QueryParam("locale") String locale, @Valid@ApiParam(value = "Screen to filter the retrieval of customizations.") @QueryParam("screen") String screen) {
Expand Down Expand Up @@ -180,8 +179,6 @@ public Response getBrandingPreference( @Valid@ApiParam(value = "Type to filte
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = CustomTextModel.class),
@ApiResponse(code = 400, message = "Invalid input in the request.", response = Error.class),
@ApiResponse(code = 401, message = "Authentication information is missing or invalid.", response = Void.class),
@ApiResponse(code = 403, message = "Access forbidden.", response = Void.class),
@ApiResponse(code = 404, message = "Requested resource is not found.", response = Error.class),
@ApiResponse(code = 500, message = "Internal server error.", response = Error.class)
})
Expand Down Expand Up @@ -228,8 +225,6 @@ public Response resolveBrandingPreference( @Valid@ApiParam(value = "Type to f
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = CustomTextModel.class),
@ApiResponse(code = 400, message = "Invalid input in the request.", response = Error.class),
@ApiResponse(code = 401, message = "Authentication information is missing or invalid.", response = Void.class),
@ApiResponse(code = 403, message = "Access forbidden.", response = Void.class),
@ApiResponse(code = 404, message = "Requested resource is not found.", response = Error.class),
@ApiResponse(code = 500, message = "Internal server error.", response = Error.class)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ public void deleteCustomTextPreference(String type, String name, String screen,
if (log.isDebugEnabled()) {
log.debug("Can not find a custom text preferences to delete for tenant: " + tenantDomain, e);
}
throw handleException(Response.Status.NOT_FOUND, ERROR_CODE_CUSTOM_TEXT_PREFERENCE_NOT_EXISTS,
tenantDomain);
return;
}
throw handleBrandingPreferenceMgtException(e, ERROR_CODE_ERROR_DELETING_CUSTOM_TEXT_PREFERENCE,
tenantDomain);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ paths:
$ref: '#/components/schemas/CustomTextModel'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
Expand Down Expand Up @@ -334,8 +330,6 @@ paths:
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
'/branding-preference/text/resolve':
Expand Down Expand Up @@ -366,10 +360,6 @@ paths:
$ref: '#/components/schemas/CustomTextModel'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
Expand Down

0 comments on commit 1758c62

Please sign in to comment.