ApiOperation.<init>
Code IndexAdd Codota to your IDE (free)

Best code snippets using io.swagger.annotations.ApiOperation.<init>(Showing top 20 results out of 963)

Refine search

  • PathParam.<init>
  • Path.<init>
  • ApiResponse.<init>
  • ApiResponses.<init>
  • Produces.<init>
  • GET.<init>
  • ApiParam.<init>
  • Common ways to obtain ApiOperation
private void myMethod () {
ApiOperation a =
  • Method method;ReflectionUtils.getAnnotation(method, ApiOperation.class)
  • Method method;method.getAnnotation(ApiOperation.class)
  • AI code suggestions by Codota
}
origin: eclipse/che

 @GET
 @Path("/{id}")
 @Produces(MediaType.APPLICATION_JSON)
 @ApiOperation("Get the project type by the id")
 @ApiResponses({
  @ApiResponse(code = 200, message = "The response contains requested project type entity"),
  @ApiResponse(code = 404, message = "The project type with such id doesn't exist")
 })
 public ProjectTypeDto getProjectType(@ApiParam("Project type id") @PathParam("id") String id)
   throws NotFoundException {
  return asDto(registry.getProjectType(id));
 }
}
origin: Graylog2/graylog2-server

@GET
@Path("/{outputId}")
@Timed
@ApiOperation(value = "Get specific output")
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
    @ApiResponse(code = 404, message = "No such output on this node.")
})
public OutputSummary get(@ApiParam(name = "outputId", value = "The id of the output we want.", required = true) @PathParam("outputId") String outputId) throws NotFoundException {
  checkPermission(RestPermissions.OUTPUTS_READ, outputId);
  final Output output = outputService.load(outputId);
  return OutputSummary.create(output.getId(), output.getTitle(), output.getType(), output.getCreatorUserId(), new DateTime(output.getCreatedAt()), output.getConfiguration(), output.getContentPack());
}
origin: eclipse/che

@DELETE
@Path("/{id}")
@ApiOperation("Remove organization with given id")
@ApiResponses({
 @ApiResponse(code = 204, message = "The organization successfully removed"),
 @ApiResponse(code = 500, message = "Internal server error occurred")
})
public void remove(@ApiParam("Organization id") @PathParam("id") String organization)
  throws ServerException {
 organizationManager.remove(organization);
}
origin: eclipse/che

@GET
@Path("/settings")
@Produces(APPLICATION_JSON)
@ApiOperation(value = "Get workspace server configuration values")
@ApiResponses({@ApiResponse(code = 200, message = "The response contains server settings")})
public Map<String, String> getSettings() {
 return ImmutableMap.of(
   Constants.SUPPORTED_RECIPE_TYPES,
   Joiner.on(",").join(workspaceManager.getSupportedRecipes()));
}
origin: Graylog2/graylog2-server

@GET
@Timed
@Path("/{indexSetId}/reopened")
@ApiOperation(value = "Get a list of reopened indices, which will not be cleaned by retention cleaning")
@Produces(MediaType.APPLICATION_JSON)
public ClosedIndices indexSetReopened(@ApiParam(name = "indexSetId") @PathParam("indexSetId") String indexSetId) {
  final IndexSet indexSet = getIndexSet(indexSetRegistry, indexSetId);
  final Set<String> reopenedIndices = indices.getReopenedIndices(indexSet).stream()
      .filter(index -> isPermitted(RestPermissions.INDICES_READ, index))
      .collect(Collectors.toSet());
  return ClosedIndices.create(reopenedIndices, reopenedIndices.size());
}
origin: Graylog2/graylog2-server

@GET
@Timed
@ApiOperation(value = "Get detailed API documentation of a single resource")
@Produces(MediaType.APPLICATION_JSON)
@Path("/{route: .+}")
public Response route(@ApiParam(name = "route", value = "Route to fetch. For example /system", required = true)
           @PathParam("route") String route,
           @Context HttpHeaders httpHeaders) {
  final URI baseUri = RestTools.buildExternalUri(httpHeaders.getRequestHeaders(), httpConfiguration.getHttpExternalUri()).resolve(HttpConfiguration.PATH_API);
  return buildSuccessfulCORSResponse(generator.generateForRoute(route, baseUri.toString()));
}
origin: Graylog2/graylog2-server

@PUT
@Path("/{inputId}")
@Timed
@ApiOperation(value = "Start or restart specified input in all nodes")
@ApiResponses(value = {
    @ApiResponse(code = 404, message = "No such input."),
})
@AuditEvent(type = AuditEventTypes.MESSAGE_INPUT_START)
public Map<String, Optional<InputCreated>> start(@ApiParam(name = "inputId", required = true) @PathParam("inputId") String inputId) {
  return getForAllNodes(remoteResource -> remoteResource.start(inputId), createRemoteInterfaceProvider(RemoteInputStatesResource.class));
}
origin: Graylog2/graylog2-server

@GET
@Timed
@Path("/{filterId}")
@ApiOperation("Get the existing blacklist filter")
@Produces(MediaType.APPLICATION_JSON)
public FilterDescription get(@ApiParam(name = "filterId", required = true)
               @PathParam("filterId")
               @NotEmpty String filterId) throws org.graylog2.database.NotFoundException {
  return filterService.load(filterId);
}
origin: Graylog2/graylog2-server

@GET
@Path("adapters/{idOrName}")
@ApiOperation(value = "List the given data adapter")
public DataAdapterApi getAdapter(@ApiParam(name = "idOrName") @PathParam("idOrName") @NotEmpty String idOrName) {
  Optional<DataAdapterDto> dataAdapterDto = dbDataAdapterService.get(idOrName);
  if (dataAdapterDto.isPresent()) {
    checkPermission(RestPermissions.LOOKUP_TABLES_READ, dataAdapterDto.get().id());
    return DataAdapterApi.fromDto(dataAdapterDto.get());
  }
  throw new NotFoundException();
}
origin: Graylog2/graylog2-server

@GET
@Path("/{outputId}")
@Timed
@ApiOperation(value = "Get specific output of a stream")
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
    @ApiResponse(code = 404, message = "No such stream/output on this node.")
})
public OutputSummary get(@ApiParam(name = "streamid", value = "The id of the stream whose outputs we want.", required = true) @PathParam("streamid") String streamid,
         @ApiParam(name = "outputId", value = "The id of the output we want.", required = true) @PathParam("outputId") String outputId) throws NotFoundException {
  checkPermission(RestPermissions.STREAMS_READ, streamid);
  checkPermission(RestPermissions.STREAM_OUTPUTS_READ, outputId);
  final Output output =  outputService.load(outputId);
  return OutputSummary.create(
      output.getId(), output.getTitle(), output.getType(), output.getCreatorUserId(), new DateTime(output.getCreatedAt()), output.getConfiguration(), output.getContentPack()
  );
}
origin: swagger-api/swagger-core

  @GET
  @Path("/bean/{id}")
  @ApiOperation(value = "Get test object by ID",
      notes = "No details provided")
  @ApiResponses({
      @ApiResponse(code = 400, message = "Invalid ID", response = NotFoundModel.class),
      @ApiResponse(code = 404, message = "object not found")})
  public Map<String, Integer> getTestBeanParams(@BeanParam TestBeanParam params, @DefaultValue("bodyParam") String
      testBody) throws
      WebApplicationException {
    return new HashMap<String, Integer>();
  }
}
origin: Graylog2/graylog2-server

@GET
@Timed
@Path("/name")
@RequiresPermissions(RestPermissions.INDEXERCLUSTER_READ)
@ApiOperation(value = "Get the cluster name")
@Produces(MediaType.APPLICATION_JSON)
public ClusterName clusterName() {
  final JsonNode health = cluster.health()
      .orElseThrow(() -> new InternalServerErrorException("Couldn't read Elasticsearch cluster health"));
  final String clusterName = health.path("cluster_name").asText("<unknown>");
  return ClusterName.create(clusterName);
}
origin: eclipse/che

@GET
@Path("/{id}")
@Produces(APPLICATION_JSON)
@GenerateLink(rel = LINK_REL_USER)
@ApiOperation("Get user by identifier")
@ApiResponses({
 @ApiResponse(code = 200, message = "The response contains requested user entity"),
 @ApiResponse(code = 404, message = "User with requested identifier not found"),
 @ApiResponse(code = 500, message = "Impossible to get user due to internal server error")
})
public UserDto getById(@ApiParam("User identifier") @PathParam("id") String id)
  throws NotFoundException, ServerException {
 final User user = userManager.getById(id);
 return linksInjector.injectLinks(asDto(user), getServiceContext());
}
origin: swagger-api/swagger-core

@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("testPostWithBody")
@ApiOperation(response = String.class, value = "Returns string with provided parameter")
public String testPostWithBody(@ApiParam(name = "body", value = "input parameters in json form")
                List<ClassWithString> items) {
  List<String> result = Lists.newArrayList();
  return String.format("Given parameters are %s", Arrays.toString(result.toArray(new String[result.size()])));
}
origin: Graylog2/graylog2-server

  @GET
  @Path("/{indexSetId}/total")
  @Timed
  @RequiresPermissions(RestPermissions.MESSAGECOUNT_READ)
  @ApiOperation(value = "Total number of messages in all your indices.")
  @Produces(MediaType.APPLICATION_JSON)
  public MessageCountResponse total(@ApiParam(name = "indexSetId") @PathParam("indexSetId") String indexSetId) {
    final IndexSet indexSet = getIndexSet(indexSetRegistry, indexSetId);

    return MessageCountResponse.create(counts.total(indexSet));
  }
}
origin: Graylog2/graylog2-server

@GET
@Path("/types")
@Timed
@ApiOperation(value = "Get all available stream types")
@Produces(MediaType.APPLICATION_JSON)
// TODO: Move this to a better place. This method is not related to a context that is bound to the instance of a stream.
public List<StreamRuleTypeResponse> types(@ApiParam(name = "streamid", value = "The stream id this new rule belongs to.", required = true)
                   @PathParam("streamid") String streamid) {
  final List<StreamRuleTypeResponse> result = new ArrayList<>(StreamRuleType.values().length);
  for (StreamRuleType type : StreamRuleType.values()) {
    result.add(StreamRuleTypeResponse.create(type.getValue(), type.name(), type.getShortDesc(), type.getLongDesc()));
  }
  return result;
}
origin: Graylog2/graylog2-server

@GET
@Timed
@Path("/nodes/{nodeId}")
@ApiOperation(value = "Information about a node.",
    notes = "This is returning information of a node in context to its state in the cluster. " +
        "Use the system API of the node itself to get system information.")
@ApiResponses(value = {
    @ApiResponse(code = 404, message = "Node not found.")
})
public NodeSummary node(@ApiParam(name = "nodeId", required = true) @PathParam("nodeId") @NotEmpty String nodeId) throws NodeNotFoundException {
  return nodeSummary(nodeService.byNodeId(nodeId));
}
origin: Graylog2/graylog2-server

@GET
@Path("/{indexSetId}/open")
@Timed
@ApiOperation(value = "Get information of all open indices managed by Graylog and their shards.")
@RequiresPermissions(RestPermissions.INDICES_READ)
@Produces(MediaType.APPLICATION_JSON)
public OpenIndicesInfo indexSetOpen(@ApiParam(name = "indexSetId") @PathParam("indexSetId") String indexSetId) {
  final IndexSet indexSet = getIndexSet(indexSetRegistry, indexSetId);
  final Set<IndexStatistics> indicesInfos = indices.getIndicesStats(indexSet).stream()
      .filter(indexStats -> isPermitted(RestPermissions.INDICES_READ, indexStats.index()))
      .collect(Collectors.toSet());
  return getOpenIndicesInfo(indicesInfos);
}
origin: Graylog2/graylog2-server

@GET
@Path("{id}/stats")
@Timed
@ApiOperation(value = "Get index set statistics")
@ApiResponses(value = {
    @ApiResponse(code = 403, message = "Unauthorized"),
    @ApiResponse(code = 404, message = "Index set not found"),
})
public IndexSetStats indexSetStatistics(@ApiParam(name = "id", required = true)
                    @PathParam("id") String id) {
  checkPermission(RestPermissions.INDEXSETS_READ, id);
  return indexSetRegistry.get(id)
      .map(indexSetStatsCreator::getForIndexSet)
      .orElseThrow(() -> new NotFoundException("Couldn't load index set with ID <" + id + ">"));
}
origin: Graylog2/graylog2-server

  @POST
  @Timed
  @Path("/multiple")
  @ApiOperation(value = "Get all metrics of all nodes in the cluster")
  @ApiResponses(value = {
      @ApiResponse(code = 400, message = "Malformed body")
  })
  @NoAuditEvent("only used to retrieve metrics of all nodes")
  public Map<String, Optional<MetricsSummaryResponse>> multipleMetricsAllNodes(@ApiParam(name = "Requested metrics", required = true)
                                         @Valid @NotNull MetricsReadRequest request) throws IOException, NodeNotFoundException {
    return getForAllNodes(remoteMetricsResource -> remoteMetricsResource.multipleMetrics(request), createRemoteInterfaceProvider(RemoteMetricsResource.class));
  }
}
io.swagger.annotationsApiOperation<init>

Popular methods of ApiOperation

  • extensions
  • hidden
  • httpMethod
  • nickname
  • notes
  • response
  • responseContainer
  • responseHeaders
  • value
  • code
  • consumes
  • produces
  • consumes,
  • produces,
  • protocols,
  • tags,
  • responseReference,
  • authorizations

Popular classes and methods

  • getSystemService (Context)
  • setRequestProperty (URLConnection)
    Sets the value of the specified request header field. The value will only be used by the current URL
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JList (javax.swing)

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)