Java 类io.swagger.annotations.ApiParam 实例源码

项目:elastest-instrumentation-manager    文件:AgentApi.java   
@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);
    }
项目:cmc-claim-store    文件:DocumentsController.java   
@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));
}
项目:swaggy-jenkins    文件:ComputerApi.java   
@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);
    }
项目:C4SG-Obsolete    文件:UserController.java   
@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;
    }
}
项目:swaggy-jenkins    文件:ViewApi.java   
@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);
    }
项目:microservice-email    文件:TemplateApiController.java   
/**
 * 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();
}
项目:Equella    文件:GroupActionResource.java   
@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();
}
项目:osc-core    文件:VirtualSystemApis.java   
@ApiOperation(value = "Retrieves the Deployment Specification",
        notes = "Retrieves a Deployment Specification specified by its owning Virtual System and Deployment Spec Id",
        response = ApplianceManagerConnectorDto.class)
@ApiResponses(value = { @ApiResponse(code = 200, message = "Successful operation"),
        @ApiResponse(code = 400, message = "In case of any error", response = ErrorCodeDto.class) })
@Path("/{vsId}/deploymentSpecs/{dsId}")
@GET
public DeploymentSpecDto getDeploymentSpec(@Context HttpHeaders headers,
        @ApiParam(value = "The Virtual System Id") @PathParam("vsId") Long vsId,
        @ApiParam(value = "The Deployment Specification Id") @PathParam("dsId") Long dsId) {
    logger.info("getting Deployment Spec " + dsId);
    this.userContext.setUser(OscAuthFilter.getUsername(headers));
    GetDtoFromEntityRequest getDtoRequest = new GetDtoFromEntityRequest();
    getDtoRequest.setEntityId(dsId);
    getDtoRequest.setEntityName("DeploymentSpec");
    GetDtoFromEntityServiceApi<DeploymentSpecDto> getDtoService = this.getDtoFromEntityServiceFactory.getService(DeploymentSpecDto.class);
    DeploymentSpecDto dto = this.apiUtil.submitBaseRequestToService(getDtoService, getDtoRequest).getDto();

    this.apiUtil.validateParentIdMatches(dto, vsId, "SecurityGroup");

    return dto;
}
项目:cmc-claim-store    文件:DocumentsController.java   
@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));
}
项目:opencps-v2    文件:DossierLogManagement.java   
@POST
@Path("log/{id}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "addDossierLogByDossierId)", response = DossierLogModel.class)
@ApiResponses(value = {
        @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns the DossierLogModel was updated", response = DossierLogResultsModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response addDossierLogByDossierId(@Context HttpServletRequest request, @Context HttpHeaders header,
        @Context Company company, @Context Locale locale, @Context User user,
        @Context ServiceContext serviceContext,
        @ApiParam(value = "id of dossier", required = true) @PathParam("id") long id,
        @ApiParam(value = "NotificationType", required = true) @Multipart("notificationType") String notificationType,
        @ApiParam(value = "Metadata of DossierLog") @Multipart("author") String author,
        @ApiParam(value = "Metadata of DossierLog") @Multipart("payload") String payload,
        @ApiParam(value = "Metadata of DossierLog") @Multipart("content") String content);
项目:swaggy-jenkins    文件:JobApi.java   
@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);
}
项目:swaggy-jenkins    文件:BlueApi.java   
@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);
    }
项目:swaggy-jenkins    文件:JobApi.java   
@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);
    }
项目:swaggy-jenkins    文件:JobApi.java   
@GET
    @Path("/{name}/lastBuild/api/json")

    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "", notes = "Retrieve job's last build details", response = FreeStyleBuild.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's last build details", response = FreeStyleBuild.class),

        @io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = FreeStyleBuild.class),

        @io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = FreeStyleBuild.class),

        @io.swagger.annotations.ApiResponse(code = 404, message = "Job cannot be found on Jenkins instance", response = FreeStyleBuild.class) })
    public Response getJobLastBuild(@ApiParam(value = "Name of the job",required=true) @PathParam("name") String name
,@Context SecurityContext securityContext)
    throws NotFoundException {
        return delegate.getJobLastBuild(name,securityContext);
    }
项目:swaggy-jenkins    文件:BlueApi.java   
@GET
    @Path("/rest/classes/{class}")

    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "", notes = "Get a list of class names supported by a given class", response = String.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 class names", response = String.class),

        @io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = String.class),

        @io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = String.class) })
    public Response getClasses(@ApiParam(value = "Name of the class",required=true) @PathParam("class") String propertyClass
)
    throws NotFoundException {
        return delegate.getClasses(propertyClass);
    }
项目:EvoMaster    文件:TriangleRest.java   
@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;
}
项目:swaggy-jenkins    文件:BlueApi.java   
@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);
    }
项目:swaggy-jenkins    文件:JobApi.java   
@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);
    }
项目:opencps-v2    文件:PaymentFileManagement.java   
@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);
项目:swaggy-jenkins    文件:BlueApi.java   
@GET
    @Path("/rest/organizations/{organization}/users/{user}")

    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "", notes = "Retrieve user details for an organization", response = User.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 users details", response = User.class),

        @io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = User.class),

        @io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = User.class) })
    public Response getUser(@ApiParam(value = "Name of the organization",required=true) @PathParam("organization") String organization
,@ApiParam(value = "Name of the user",required=true) @PathParam("user") String user
)
    throws NotFoundException {
        return delegate.getUser(organization,user);
    }
项目:swaggy-jenkins    文件:BlueApi.java   
@PUT
    @Path("/rest/organizations/{organization}/pipelines/{pipeline}/favorite")

    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "", notes = "Favorite/unfavorite a pipeline", response = FavoriteImpl.class, authorizations = {
        @io.swagger.annotations.Authorization(value = "jenkins_auth")
    }, tags={ "blueOcean", })
    @io.swagger.annotations.ApiResponses(value = { 
        @io.swagger.annotations.ApiResponse(code = 200, message = "Successfully favorited/unfavorited a pipeline", response = FavoriteImpl.class),

        @io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = FavoriteImpl.class),

        @io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = FavoriteImpl.class) })
    public Response putPipelineFavorite(@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 = "Set JSON string body to {\"favorite\": true} to favorite, set value to false to unfavorite" ,required=true) String body
,@Context SecurityContext securityContext)
    throws NotFoundException {
        return delegate.putPipelineFavorite(organization,pipeline,body,securityContext);
    }
项目:PaymentService    文件:InvoicesApi.java   
@GET
    @Path("/{invoiceId}/transferState")
    @Consumes({ "application/json" })
    @Produces({ "application/json", "text/plain" })
    @io.swagger.annotations.ApiOperation(value = "Returns a confidence object that describes the state of the transfer tx.", notes = "", response = State.class, tags={  })
    @io.swagger.annotations.ApiResponses(value = { 
        @io.swagger.annotations.ApiResponse(code = 200, message = "returns the state object of the transfer tx", response = State.class),

        @io.swagger.annotations.ApiResponse(code = 404, message = "invoice not found", response = State.class),

        @io.swagger.annotations.ApiResponse(code = 423, message = "no transfer state because there are no transfers in the invoice", response = State.class) })
    public Response getInvoiceTransferState(@ApiParam(value = "the invoice id to get the state for",required=true) @PathParam("invoiceId") UUID invoiceId
,@Context SecurityContext securityContext)
    throws NotFoundException {
        return delegate.getInvoiceTransferState(invoiceId,securityContext);
    }
项目:opencps-v2    文件:ServiceInfoManagement.java   
@POST
@Path("/{id}/filetemplates")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Add FileTempate to ServiceInfo)", response = FileTemplateModel.class)
@ApiResponses(value = {
        @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns the FileTemplate was updated", response = FileTemplateModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response addFileTemplateToServiceInfo(@Context HttpServletRequest request, @Context HttpHeaders header,
        @Context Company company, @Context Locale locale, @Context User user,
        @Context ServiceContext serviceContext,
        @ApiParam(value = "Attachment files", required = true) @Multipart("file") Attachment file,
        @ApiParam(value = "id of ServiceInfo that need to be upload file to", required = true) @PathParam("id") String id,
        @ApiParam(value = "Metadata of FileTemplate", required = true) @Multipart("fileTemplateNo") String fileTemplateNo,
        @ApiParam(value = "Metadata of FileTemplate") @Multipart("templateName") String templateName,
        @ApiParam(value = "Metadata of FileType") @Multipart("fileType") String fileType,
        @ApiParam(value = "Metadata of FileSize") @Multipart("fileSize") int fileSize, @Multipart("fileName") String fileName);
项目:swaggy-jenkins    文件:BlueApi.java   
@GET
    @Path("/rest/organizations/{organization}/pipelines/")

    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "", notes = "Retrieve all pipelines details for an organization", response = Pipelines.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 pipelines details", response = Pipelines.class),

        @io.swagger.annotations.ApiResponse(code = 401, message = "Authentication failed - incorrect username and/or password", response = Pipelines.class),

        @io.swagger.annotations.ApiResponse(code = 403, message = "Jenkins requires authentication - please set username and password", response = Pipelines.class) })
    public Response getPipelines(@ApiParam(value = "Name of the organization",required=true) @PathParam("organization") String organization
,@Context SecurityContext securityContext)
    throws NotFoundException {
        return delegate.getPipelines(organization,securityContext);
    }
项目:opencps-v2    文件:CommentManagement.java   
@DELETE
@Path("/{id}")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response removeComment(@Context HttpServletRequest request, @Context HttpHeaders header,
        @Context ServiceContext serviceContext,
        @ApiParam(value = "id of comment for delete user from") @PathParam("id") long commentId);
项目:nifi-registry    文件:AccessPolicyResource.java   
/**
 * Update an access policy.
 *
 * @param httpServletRequest request
 * @param identifier         The id of the access policy to update.
 * @param requestAccessPolicy An access policy.
 * @return the updated access policy.
 */
@PUT
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("{id}")
@ApiOperation(
        value = "Updates a access policy",
        response = AccessPolicy.class
)
@ApiResponses({
        @ApiResponse(code = 400, message = HttpStatusMessages.MESSAGE_400),
        @ApiResponse(code = 401, message = HttpStatusMessages.MESSAGE_401),
        @ApiResponse(code = 403, message = HttpStatusMessages.MESSAGE_403),
        @ApiResponse(code = 404, message = HttpStatusMessages.MESSAGE_404),
        @ApiResponse(code = 409, message = HttpStatusMessages.MESSAGE_409 + " The NiFi Registry might not be configured to use a ConfigurableAccessPolicyProvider.") })
public Response updateAccessPolicy(
        @Context
        final HttpServletRequest httpServletRequest,
        @ApiParam(value = "The access policy id.", required = true)
        @PathParam("id")
        final String identifier,
        @ApiParam(value = "The access policy configuration details.", required = true)
        final AccessPolicy requestAccessPolicy) {

    verifyAuthorizerSupportsConfigurablePolicies();
    authorizeAccess(RequestAction.WRITE);

    if (requestAccessPolicy == null) {
        throw new IllegalArgumentException("Access policy details must be specified when updating a policy.");
    }
    if (!identifier.equals(requestAccessPolicy.getIdentifier())) {
        throw new IllegalArgumentException(String.format("The policy id in the request body (%s) does not equal the "
                + "policy id of the requested resource (%s).", requestAccessPolicy.getIdentifier(), identifier));
    }

    AccessPolicy createdPolicy = authorizationService.updateAccessPolicy(requestAccessPolicy);

    String locationUri = generateAccessPolicyUri(createdPolicy);
    return generateOkResponse(createdPolicy).build();
}
项目:opencps-v2    文件:ServiceConfigManagement.java   
@GET
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@ApiOperation(value = "Get all ServiceConfigs", response = ServiceConfigResultsModel.class)
@ApiResponses(value = {
        @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a list of ServiceConfig", response = ServiceConfigResultsModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
        @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response getServiceConfigs(@Context HttpServletRequest request, @Context HttpHeaders header,
        @Context Company company, @Context Locale locale, @Context User user,
        @Context ServiceContext serviceContext,
        @ApiParam(value = "query params for search") @BeanParam ServiceConfigSearchModel search);
项目:C4SG-Obsolete    文件:OrganizationController.java   
@CrossOrigin
@RequestMapping(value = "/search/byKeyword/{keyWord}", produces = {"application/json"}, method = RequestMethod.GET)
@ApiOperation(value = "Find organization by keyWord", notes = "Returns a collection of organizations")
public List<OrganizationDTO> getOrganization(@ApiParam(value = "Keyword of organization to return", required = true)
                                             @PathVariable("keyWord") String keyWord) {
    return organizationService.findByKeyword(keyWord);
}
项目:c4sg-services    文件:SlackController.java   
@RequestMapping(value = "/isJoinedChat", method = RequestMethod.GET)
@ApiOperation(value = "Find user by ID", notes = "Returns a user")
public String getUser(
        @ApiParam(value = "emailID of user", required = true) @RequestParam(required = true) String email) {
    Boolean isJoinedChat = slackClientService.isJoinedChat(email);
    if (isJoinedChat) {
        return "Y";
    } else {
        return "N";
    }
}
项目:Code4Health-Platform    文件:OperinoResource.java   
/**
 * SEARCH  /_search/operinos?query=:query : search for the operino corresponding
 * to the query.
 *
 * @param query the query of the operino search 
 * @param pageable the pagination information
 * @return the result of the search
 * @throws URISyntaxException if there is an error to generate the pagination HTTP headers
 */
@GetMapping("/_search/operinos")
@Timed
public ResponseEntity<List<Operino>> searchOperinos(@RequestParam String query, @ApiParam Pageable pageable)
    throws URISyntaxException {
    log.debug("REST request to search for a page of Operinos for query {}", query);
    Page<Operino> page = operinoService.search(query, pageable);
    HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, "/api/_search/operinos");
    return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
项目:spring-io    文件:UserResource.java   
/**
 * GET  /users : get all users.
 *
 * @param pageable the pagination information
 * @return the ResponseEntity with status 200 (OK) and with body all users
 */
@GetMapping("/users")
@Timed
public ResponseEntity<List<UserDTO>> getAllUsers(@ApiParam Pageable pageable) {
    final Page<UserDTO> page = userService.getAllManagedUsers(pageable);
    HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/users");
    return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
项目:cf-mta-deploy-service    文件:OperationsApi.java   
@GET

@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "", notes = "Retrieves Multi-Target Application operations ", response = Operation.class, responseContainer = "List", authorizations = {
    @Authorization(value = "oauth2", scopes = {

    })
}, tags={  })
@ApiResponses(value = { 
    @ApiResponse(code = 200, message = "OK", response = Operation.class, responseContainer = "List") })
public Response getMtaOperations( @ApiParam(value = "")  @QueryParam("last") Integer last,  @ApiParam(value = "")  @QueryParam("state") List<String> state) {
    return delegate.getMtaOperations(last, state, securityContext, spaceGuid);
}
项目:cf-mta-deploy-service    文件:OperationsApi.java   
@POST

    @Consumes({ "application/json" })
    @Produces({ "application/json" })
    @ApiOperation(value = "", notes = "Starts execution of a Multi-Target Application operation ", response = Void.class, authorizations = {
        @Authorization(value = "oauth2", scopes = {

        }) }, tags = {})
    @ApiResponses(value = { @ApiResponse(code = 202, message = "Accepted", response = Void.class) })
    public Response startMtaOperation(@ApiParam(value = "", required = true) Operation operation) {
        return delegate.startMtaOperation(operation, securityContext, spaceGuid);
    }
项目:comms-router    文件:RouterResource.java   
@PUT
@Path("{ref}")
@ApiOperation(
    value = "Replace an existing router",
    notes = "If the router with the specified id does not exist, it creates it",
    tags = "routers")
@ApiResponses({@ApiResponse(code = 200, message = "Successful operation"),
    @ApiResponse(code = 400, message = "Invalid ID supplied",
        response = ExceptionPresentation.class),
    @ApiResponse(code = 404, message = "Router not found",
        response = ExceptionPresentation.class),
    @ApiResponse(code = 405, message = "Validation exception",
        response = ExceptionPresentation.class)})
public Response put(
    @ApiParam(
        value = "The id of the router to be updated",
        required = true) @PathParam("ref") String ref,
    @ApiParam(value = "CreateRouterArg object specifying all the parameters",
        required = true) CreateRouterArg routerArg)
    throws CommsRouterException {

  LOGGER.debug("Replacing router: {}, with ref: {}", routerArg, ref);

  ApiObjectRef router = routerService.replace(routerArg, ref);

  URI createLocation =
      UriBuilder.fromResource(this.getClass()).path("{ref}").build(router.getRef());

  return Response.status(Status.CREATED)
      .header(HttpHeaders.LOCATION, createLocation.toString())
      .entity(router)
      .build();
}
项目:opencps-v2    文件:PaymentFileManagement.java   
@GET
@Path("/{id}/payments")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@ApiOperation(value = "getPaymentFilesByDossierId", response = PaymentFileResultModel.class)
@ApiResponses(value = {
            @ApiResponse (code = HttpURLConnection.HTTP_OK, message = "Return a list Payment", response = PaymentFileResultModel.class),
            @ApiResponse (code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not Found", response = ExceptionModel.class),
            @ApiResponse (code = HttpURLConnection.HTTP_FORBIDDEN, message = "Accsess denied", response = ExceptionModel.class) })
public Response getPaymentFilesByDossierId(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company,
        @Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
        @ApiParam(value = "id of dossier", required = true) @PathParam("id") String id, @BeanParam PaymentFileSearchModel search);
项目:automat    文件:LoginController.java   
@ApiOperation(value = "用户登录")
@PostMapping("/login")
public Object login(@ApiParam(required = true, value = "登录帐号和密码") @RequestBody Login user, ModelMap modelMap,
        HttpServletRequest request) {
    Assert.notNull(user.getAccount(), "ACCOUNT");
    Assert.notNull(user.getPassword(), "PASSWORD");
    if (LoginHelper.login(request, user.getAccount(), SecurityUtil.encryptPassword(user.getPassword()))) {
        request.setAttribute("msg", "[" + user.getAccount() + "]登录成功.");
        return setSuccessModelMap(modelMap);
    }
    request.setAttribute("msg", "[" + user.getAccount() + "]登录失败.");
    throw new LoginException(Resources.getMessage("LOGIN_FAIL"));
}
项目:poppynotes    文件:EditUserApi.java   
@ApiOperation(value = "Update User", notes = "Updated a User entry.", response = Void.class, tags={ "Users", })
@ApiResponses(value = { 
    @ApiResponse(code = 200, message = "User updated.", response = Void.class),
    @ApiResponse(code = 400, message = "Bad request (validation failed).", response = Error.class),
    @ApiResponse(code = 401, message = "Unauthorized (need to log in / get token).", response = Void.class),
    @ApiResponse(code = 403, message = "Forbidden (no rights to access resource).", response = Void.class),
    @ApiResponse(code = 404, message = "Entity not found.", response = Error.class),
    @ApiResponse(code = 409, message = "Request results in a conflict.", response = Error.class),
    @ApiResponse(code = 500, message = "Internal Server Error.", response = Void.class) })
@RequestMapping(value = "/api/v1/users",
    produces = { "application/json" }, 
    consumes = { "application/json" },
    method = RequestMethod.PUT)
ResponseEntity<Void> apiV1UsersPut(@ApiParam(value = "" ,required=true ) @RequestBody UpdateUser userUpdate, BindingResult bindingResult) throws DtoValidationFailedException, UserNotFoundException, DuplicateUserException;
项目:elastest-instrumentation-manager    文件:AgentsApi.java   
@GET

    @Consumes({ "application/json" })
    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "Retrieve all agents", notes = "A client retrieves all agents", response = void.class, tags={  })
    @io.swagger.annotations.ApiResponses(value = { 
        @io.swagger.annotations.ApiResponse(code = 200, message = "Information successfully retrieved", response = void.class),

        @io.swagger.annotations.ApiResponse(code = 200, message = "Unexpected error", response = void.class) })
    public Response getAgents(@ApiParam(value = "Events to be published" ,required=true) Events events
,@Context SecurityContext securityContext)
    throws NotFoundException {
        return delegate.getAgents(events,securityContext);
    }
项目:MTC_Labrat    文件:AuditResource.java   
/**
 * GET  /audits : get a page of AuditEvents.
 *
 * @param pageable the pagination information
 * @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body
 */
@GetMapping
public ResponseEntity<List<AuditEvent>> getAll(@ApiParam Pageable pageable) {
    Page<AuditEvent> page = auditEventService.findAll(pageable);
    HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits");
    return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
项目:presto-manager    文件:ConnectorsAPI.java   
@GET
@Path("/{file}/{property}")
@Produces(MediaType.TEXT_PLAIN)
@ApiOperation(value = "Get specific connector property")
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "Retrieved property"),
        @ApiResponse(code = 404, message = "Resource not found")})
public synchronized Response getConnectorProperty(
        @PathParam("file") @ApiParam("The name of a file") String file,
        @PathParam("property") @ApiParam("A specific property") String property)
{
    return apiFileHandler.getFileProperty(file, property);
}