本文整理汇总了Java中io.swagger.annotations.ApiParam类的典型用法代码示例。如果您正苦于以下问题:Java ApiParam类的具体用法?Java ApiParam怎么用?Java ApiParam使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ApiParam类属于io.swagger.annotations包,在下文中一共展示了ApiParam类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: defendantResponseCopy
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@ApiOperation("Returns a Defendant Response copy for a given claim external id")
@GetMapping(
value = "/defendantResponseCopy/{externalId}",
produces = MediaType.APPLICATION_PDF_VALUE
)
public ResponseEntity<ByteArrayResource> defendantResponseCopy(
@ApiParam("Claim external id")
@PathVariable("externalId") @NotBlank String externalId
) {
byte[] pdfDocument = documentsService.generateDefendantResponseCopy(externalId);
return ResponseEntity
.ok()
.contentLength(pdfDocument.length)
.body(new ByteArrayResource(pdfDocument));
}
示例2: postAgent
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Consumes({ "application/json" })
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "Register an agent", notes = "A client registers an agent", response = Agent.class, tags={ "Agent", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Agent creation OK", response = Agent.class),
@io.swagger.annotations.ApiResponse(code = 201, message = "Created", response = Agent.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Bad Request", response = Agent.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized", response = Agent.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Forbidden", response = Agent.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not Found", response = Agent.class) })
public Response postAgent(@ApiParam(value = "Definition of an agent that is going to be created" ,required=true) Host body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.postAgent(body,securityContext);
}
示例3: searchItems
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Path("/changeid/{newid}")
@ApiOperation(value = "Change all references from an existing group ID to a new group ID")
public Response searchItems(
// @formatter:off
@ApiParam("Existing group ID") @PathParam("id") String groupId,
@ApiParam("The new ID that all group references will be changed to") @PathParam("newid") String newGroupId
// @formatter:on
)
{
if( tleAclManager.filterNonGrantedPrivileges("EDIT_USER_MANAGEMENT").isEmpty() )
{
return Response.status(Status.UNAUTHORIZED).build();
}
eventService.publishApplicationEvent(new GroupIdChangedEvent(groupId, newGroupId));
return Response.ok().build();
}
示例4: getPipelineActivities
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@GET
@Path("/rest/organizations/{organization}/pipelines/{pipeline}/activities")
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Retrieve all activities details for an organization pipeline", response = PipelineActivities.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "blueOcean", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully retrieved all activities details", response = PipelineActivities.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = PipelineActivities.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = PipelineActivities.class) })
public Response getPipelineActivities(@ApiParam(value = "Name of the organization",required=true) @PathParam("organization") String organization
,@ApiParam(value = "Name of the pipeline",required=true) @PathParam("pipeline") String pipeline
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getPipelineActivities(organization,pipeline,securityContext);
}
示例5: getComputer
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@GET
@Path("/api/json")
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Retrieve computer details", response = ComputerSet.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "remoteAccess", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully retrieved computer details", response = ComputerSet.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = ComputerSet.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = ComputerSet.class) })
public Response getComputer(@ApiParam(value = "Recursion depth in response model",required=true) @QueryParam("depth") Integer depth
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getComputer(depth,securityContext);
}
示例6: uploadResume
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@RequestMapping(value = "/{id}/uploadResume", method = RequestMethod.POST)
@ApiOperation(value = "Add new upload resume")
public String uploadResume(@ApiParam(value = "user Id", required = true) @PathVariable("id") Integer id,
@ApiParam(value = "Resume File(.pdf)", required = true) @RequestPart("file") MultipartFile file) {
String contentType = file.getContentType();
if (!FileUploadUtil.isValidResumeFile(contentType)) {
return "Invalid pdf File! Content Type :-" + contentType;
}
File directory = new File(RESUME_UPLOAD.getValue());
if (!directory.exists()) {
directory.mkdir();
}
File f = new File(userService.getResumeUploadPath(id));
try (FileOutputStream fos = new FileOutputStream(f)) {
byte[] fileByte = file.getBytes();
fos.write(fileByte);
return "Success";
} catch (Exception e) {
return "Error saving resume for User " + id + " : " + e;
}
}
示例7: getView
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@GET
@Path("/{name}/api/json")
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Retrieve view details", response = ListView.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "remoteAccess", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully retrieved view details", response = ListView.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = ListView.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = ListView.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "View cannot be found on Jenkins instance", response = ListView.class) })
public Response getView(@ApiParam(value = "Name of the view",required=true) @PathParam("name") String name
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getView(name,securityContext);
}
示例8: createTemplate
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
/**
* Process POST /templates request
* Create a template
*
* @param template template to create
* @return response entity
*/
@Override
public ResponseEntity<Object> createTemplate(@ApiParam(value = "Create a template", required = true) @RequestBody TemplateBody template) {
// Create template in database
TemplateEntity entity = toTemplateEntity(template);
templateRepository.save(entity);
URI location = ServletUriComponentsBuilder.fromCurrentRequest()
.path("/{id}")
.buildAndExpand(entity.getId())
.toUri();
// Update template's URL in database
entity.setUrl(location.toString());
templateRepository.save(entity);
return ResponseEntity.created(location).build();
}
示例9: defendantResponseReceipt
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@ApiOperation("Returns a Defendant Response receipt for a given claim external id")
@GetMapping(
value = "/defendantResponseReceipt/{externalId}",
produces = MediaType.APPLICATION_PDF_VALUE
)
public ResponseEntity<ByteArrayResource> defendantResponseReceipt(
@ApiParam("Claim external id")
@PathVariable("externalId") @NotBlank String externalId
) {
byte[] pdfDocument = documentsService.generateDefendantResponseReceipt(externalId);
return ResponseEntity
.ok()
.contentLength(pdfDocument.length)
.body(new ByteArrayResource(pdfDocument));
}
示例10: postJobConfig
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Path("/{name}/config.xml")
@Produces({ "text/xml" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Update job configuration", response = Void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "remoteAccess", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully retrieved job configuration in config.xml format", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "An error has occurred - error message is embedded inside the HTML response", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Job cannot be found on Jenkins instance", response = Void.class) })
public Response postJobConfig( @PathParam("name") String name,@ApiParam(value = "Job configuration in config.xml format" ,required=true) String body,@ApiParam(value = "CSRF protection token" )@HeaderParam("Jenkins-Crumb") String jenkinsCrumb,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.postJobConfig(name,body,jenkinsCrumb,securityContext);
}
示例11: postPipelineRun
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Path("/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/replay")
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Replay an organization pipeline run", response = QueueItemImpl.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "blueOcean", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully replayed a pipeline run", response = QueueItemImpl.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = QueueItemImpl.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = QueueItemImpl.class) })
public Response postPipelineRun(@ApiParam(value = "Name of the organization",required=true) @PathParam("organization") String organization
,@ApiParam(value = "Name of the pipeline",required=true) @PathParam("pipeline") String pipeline
,@ApiParam(value = "Name of the run",required=true) @PathParam("run") String run
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.postPipelineRun(organization,pipeline,run,securityContext);
}
示例12: postJobConfig
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Path("/{name}/config.xml")
@Produces({ "text/xml" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Update job configuration", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "remoteAccess", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully retrieved job configuration in config.xml format", response = void.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "An error has occurred - error message is embedded inside the HTML response", response = void.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = void.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Job cannot be found on Jenkins instance", response = void.class) })
public Response postJobConfig(@ApiParam(value = "Name of the job",required=true) @PathParam("name") String name
,@ApiParam(value = "Job configuration in config.xml format" ,required=true) String body
,@ApiParam(value = "CSRF protection token" )@HeaderParam("Jenkins-Crumb") String jenkinsCrumb
)
throws NotFoundException {
return delegate.postJobConfig(name,body,jenkinsCrumb);
}
示例13: checkTriangle
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@ApiOperation("Check the triangle type of the given three edges")
@RequestMapping(
value = "/{a}/{b}/{c}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON
)
public TriangleResponseDto checkTriangle(
@ApiParam("First edge")
@PathVariable("a") Integer a,
@ApiParam("Second edge")
@PathVariable("b") Integer b,
@ApiParam("Third edge")
@PathVariable("c") Integer c
){
TriangleResponseDto dto = new TriangleResponseDto();
dto.classification = new TriangleClassificationImpl().classify(a,b,c);
return dto;
}
示例14: postJobEnable
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Path("/{name}/enable")
@io.swagger.annotations.ApiOperation(value = "", notes = "Enable a job", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "jenkins_auth")
}, tags={ "remoteAccess", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Successfully enabled the job", response = void.class),
@io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = void.class),
@io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Job cannot be found on Jenkins instance", response = void.class) })
public Response postJobEnable(@ApiParam(value = "Name of the job",required=true) @PathParam("name") String name
,@ApiParam(value = "CSRF protection token" )@HeaderParam("Jenkins-Crumb") String jenkinsCrumb
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.postJobEnable(name,jenkinsCrumb,securityContext);
}
示例15: updateEpaymentProfile
import io.swagger.annotations.ApiParam; //导入依赖的package包/类
@POST
@Path("/{id}/payments/{referenceUid}/epaymentprofile")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Add epaymentprofile", response = JSONObject.class)
@ApiResponses(value = {
@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns epaymentprofile was update", response = JSONObject.class),
@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class),
@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class) })
public Response updateEpaymentProfile(@Context HttpServletRequest request, @Context HttpHeaders header,
@Context Company company, @Context Locale locale, @Context User user,
@Context ServiceContext serviceContext,
@ApiParam(value = "id of Payment", required = true) @PathParam("id") String id,
@ApiParam (value = "referenceUid of Payment", required = true) @PathParam("referenceUid") String referenceUid,
@BeanParam PaymentFileInputModel input);