當前位置: 首頁>>代碼示例>>Java>>正文


Java ApiParam類代碼示例

本文整理匯總了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));
}
 
開發者ID:hmcts,項目名稱:cmc-claim-store,代碼行數:17,代碼來源:DocumentsController.java

示例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);
    }
 
開發者ID:elastest,項目名稱:elastest-instrumentation-manager,代碼行數:23,代碼來源:AgentApi.java

示例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();
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:20,代碼來源:GroupActionResource.java

示例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);
    }
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:20,代碼來源:BlueApi.java

示例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);
    }
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:19,代碼來源:ComputerApi.java

示例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;
	}
}
 
開發者ID:Code4SocialGood,項目名稱:C4SG-Obsolete,代碼行數:23,代碼來源:UserController.java

示例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);
    }
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:21,代碼來源:ViewApi.java

示例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();
}
 
開發者ID:PestaKit,項目名稱:microservice-email,代碼行數:27,代碼來源:TemplateApiController.java

示例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));
}
 
開發者ID:hmcts,項目名稱:cmc-claim-store,代碼行數:17,代碼來源:DocumentsController.java

示例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);
}
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:22,代碼來源:JobApi.java

示例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);
    }
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:21,代碼來源:BlueApi.java

示例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);
    }
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:25,代碼來源:JobApi.java

示例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;
}
 
開發者ID:EMResearch,項目名稱:EvoMaster,代碼行數:21,代碼來源:TriangleRest.java

示例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);
    }
 
開發者ID:cliffano,項目名稱:swaggy-jenkins,代碼行數:22,代碼來源:JobApi.java

示例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);
 
開發者ID:VietOpenCPS,項目名稱:opencps-v2,代碼行數:17,代碼來源:PaymentFileManagement.java


注:本文中的io.swagger.annotations.ApiParam類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。