下面列出了javax.ws.rs.core.MediaType#APPLICATION_JSON_PATCH_JSON 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);
/**
* {@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);