Java Code Examples for javax.ws.rs.core.MediaType#APPLICATION_JSON_PATCH_JSON

The following examples show how to use javax.ws.rs.core.MediaType#APPLICATION_JSON_PATCH_JSON . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProductVersionEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 * 
 * @param id
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ProductVersion.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
ProductVersion getSpecific(@Parameter(description = PV_ID) @PathParam("id") String id);
 
Example 2
Source File: ProductVersionEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 * 
 * @param id {@value PV_ID}
 * @param productVersion
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ProductVersion.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
ProductVersion patchSpecific(
        @Parameter(description = PV_ID) @PathParam("id") String id,
        @NotNull ProductVersion productVersion);
 
Example 3
Source File: ProductMilestoneEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 * 
 * @param id {@value PM_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ProductMilestone.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
ProductMilestone getSpecific(@Parameter(description = PM_ID) @PathParam("id") String id);
 
Example 4
Source File: ProductMilestoneEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 * 
 * @param id {@value PM_ID}
 * @param productMilestone
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ProductMilestone.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
ProductMilestone patchSpecific(
        @Parameter(description = PM_ID) @PathParam("id") String id,
        @NotNull ProductMilestone productMilestone);
 
Example 5
Source File: ProductReleaseEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 * 
 * @param id {@value PR_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ProductRelease.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
ProductRelease getSpecific(@Parameter(description = PR_ID) @PathParam("id") String id);
 
Example 6
Source File: ProductReleaseEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 * 
 * @param id {@value PR_ID}
 * @param productRelease
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ProductRelease.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
ProductRelease patchSpecific(
        @Parameter(description = PR_ID) @PathParam("id") String id,
        @NotNull ProductRelease productRelease);
 
Example 7
Source File: GroupConfigurationEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 *
 * @param id {@value GC_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = GroupConfiguration.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
GroupConfiguration getSpecific(@Parameter(description = GC_ID) @PathParam("id") String id);
 
Example 8
Source File: GroupConfigurationEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 *
 * @param id {@value GC_ID}
 * @param groupConfig
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = GroupConfiguration.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
GroupConfiguration patchSpecific(
        @Parameter(description = GC_ID) @PathParam("id") String id,
        @NotNull GroupConfiguration groupConfig);
 
Example 9
Source File: ProjectEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 * 
 * @param id {@value P_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = Project.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
Project getSpecific(@Parameter(description = P_ID) @PathParam("id") String id);
 
Example 10
Source File: ProjectEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 * 
 * @param id {@value P_ID}
 * @param project
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = Project.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
Project patchSpecific(@Parameter(description = P_ID) @PathParam("id") String id, @NotNull Project project);
 
Example 11
Source File: BuildConfigurationEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 *
 * @param id {@value BC_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = BuildConfiguration.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
BuildConfiguration getSpecific(@Parameter(description = BC_ID) @PathParam("id") String id);
 
Example 12
Source File: BuildConfigurationEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 *
 * @param id {@value BC_ID}
 * @param buildConfig
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = BuildConfiguration.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
BuildConfiguration patchSpecific(
        @Parameter(description = BC_ID) @PathParam("id") String id,
        BuildConfiguration buildConfig);
 
Example 13
Source File: ProductEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 * 
 * @param id {@value P_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = Product.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
Product getSpecific(@Parameter(description = P_ID) @PathParam("id") String id);
 
Example 14
Source File: ProductEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC_DESC}
 * 
 * @param id {@value P_ID}
 * @param product
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = Product.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
Product patchSpecific(@Parameter(description = P_ID) @PathParam("id") String id, @NotNull Product product);
 
Example 15
Source File: SCMRepositoryEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value GET_SPECIFIC_DESC}
 *
 * @param id {@value SCM_ID}
 * @return
 */
@Operation(
        summary = GET_SPECIFIC_DESC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = SCMRepository.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@GET
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON) // workaround for PATCH support
SCMRepository getSpecific(@Parameter(description = SCM_ID) @PathParam("id") String id);
 
Example 16
Source File: SCMRepositoryEndpoint.java    From pnc with Apache License 2.0 6 votes vote down vote up
/**
 * {@value PATCH_SPECIFIC}
 *
 * @param id {@value SCM_ID}
 * @param scmRepository
 * @return
 */
@Operation(
        summary = PATCH_SPECIFIC,
        responses = {
                @ApiResponse(
                        responseCode = SUCCESS_CODE,
                        description = SUCCESS_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = SCMRepository.class))),
                @ApiResponse(
                        responseCode = INVALID_CODE,
                        description = INVALID_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
                @ApiResponse(responseCode = NOT_FOUND_CODE, description = NOT_FOUND_DESCRIPTION),
                @ApiResponse(
                        responseCode = SERVER_ERROR_CODE,
                        description = SERVER_ERROR_DESCRIPTION,
                        content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
@PATCH
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
SCMRepository patchSpecific(
        @Parameter(description = SCM_ID) @PathParam("id") String id,
        @NotNull SCMRepository scmRepository);