org.eclipse.microprofile.openapi.annotations.Operation类的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中org.eclipse.microprofile.openapi.annotations.Operation类的一些代码示例,展示了Operation类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operation类的具体详情如下:
包路径:org.eclipse.microprofile.openapi.annotations.Operation
类名称:Operation

Operation介绍

暂无

代码示例

代码示例来源:origin: org.microprofile-ext.openapi-ext/swagger-ui

@GET
@Produces("image/png")
@Path("favicon-{size}.png")
@Operation(hidden = true)
public byte[] getFavicon(@PathParam("size") int size){
  return templates.getFavicon(size);
}

代码示例来源:origin: org.apache.geronimo/geronimo-openapi-impl

if (!op.operationId().isEmpty()) {
  operation.operationId(op.operationId());
} else {
  operation.operationId(operationNamingStrategy.name(new NamingStrategy.Context(m, httpVerb, path)));
if (!op.summary().isEmpty()) {
  operation.summary(op.summary());
operation.deprecated(op.deprecated());
if (!op.description().isEmpty()) {
  operation.description(op.description());

代码示例来源:origin: org.microprofile-ext.openapi-ext/swagger-ui

@GET
@Produces("text/css")
@Path("style.css")
@Operation(hidden = true)
public Response getCss(){
  String css = templates.getStyle();
  return Response.ok(css, "text/css").build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extensions/openapi-ext

@GET
@Produces("image/png")
@Path("logo.png")
@Operation(hidden = true)
public byte[] getLogo(){
  return templates.getOriginalLogo();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extentions/openapi-ext

@GET
@Produces("image/png")
@Path("favicon-{size}.png")
@Operation(hidden = true)
public byte[] getFavicon(@PathParam("size") int size){
  return templates.getFavicon(size);
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extensions/openapi-ext

@GET
@Produces(MediaType.TEXT_HTML)
@Path(INDEX_HTML)
@Operation(hidden = true)
public Response getOpenApiUI(){
  String swaggerUI = templates.getSwaggerUIHtml(uriInfo,request);
  return Response.ok(swaggerUI, MediaType.TEXT_HTML).build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extentions/openapi-ext

@GET
@Produces(MediaType.TEXT_HTML)
@Path(INDEX_HTML)
@Operation(hidden = true)
public Response getOpenApiUI(){
  String swaggerUI = templates.getSwaggerUIHtml(uriInfo,request);
  return Response.ok(swaggerUI, MediaType.TEXT_HTML).build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extentions/openapi-ext

@GET
@Produces("text/css")
@Path("style.css")
@Operation(hidden = true)
public Response getCss(){
  String css = templates.getStyle();
  return Response.ok(css, "text/css").build();
}

代码示例来源:origin: org.eclipse.microprofile.openapi/microprofile-openapi-tck

@GET
  @Path("/logout")
  @APIResponse(
      description = "successful operation"
    )
  @Operation(
    summary = "Logs out current logged in user session"
  )
  public Response logoutUser() {
    return Response.ok().entity("").build();
  }
}

代码示例来源:origin: org.microprofile-ext.openapi-ext/swagger-ui

@GET
@Produces("image/png")
@Path("logo.png")
@Operation(hidden = true)
public byte[] getLogo(){
  return templates.getOriginalLogo();
}

代码示例来源:origin: org.microprofile-ext.openapi-ext/swagger-ui

@GET
@Produces(MediaType.TEXT_HTML)
@Path(INDEX_HTML)
@Operation(hidden = true)
public Response getOpenApiUI(){
  String swaggerUI = templates.getSwaggerUIHtml(uriInfo,request);
  return Response.ok(swaggerUI, MediaType.TEXT_HTML).build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extensions/openapi-ext

@GET
@Produces("text/css")
@Path("style.css")
@Operation(hidden = true)
public Response getCss(){
  String css = templates.getStyle();
  return Response.ok(css, "text/css").build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extentions/openapi-ext

@GET
@Produces("image/png")
@Path("logo.png")
@Operation(hidden = true)
public byte[] getLogo(){
  return templates.getOriginalLogo();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extensions/openapi-ext

@GET
@Produces("image/png")
@Path("favicon-{size}.png")
@Operation(hidden = true)
public byte[] getFavicon(@PathParam("size") int size){
  return templates.getFavicon(size);
}

代码示例来源:origin: org.microprofile-ext.config-ext/configsource-memory

@GET
@Path("/source/{name}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(description = "Getting the config source with a certain name")
@APIResponse(responseCode = "200", description = "Successful, returning the config source in JSON format")
public Response getConfigSource(@Parameter(name = "name", description = "The name for this config source", required = true, allowEmptyValue = false, example = "MemoryConfigSource")
             @PathParam("name") String name){
  if(!enabled)return Response.status(Response.Status.FORBIDDEN).header(REASON, NOT_ENABLED).build();
  if(!configSourceMap.containsKey(name))return Response.noContent().header(REASON, NO_SUCH_CONFIGSOURCE).build();
    
  ConfigSource source = configSourceMap.get(name);
  return Response.ok(toJsonObject(source)).build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extensions/openapi-ext

@GET
@Produces(MediaType.TEXT_HTML)
@Operation(hidden = true)
public Response getSwaggerUINaked(){
  URI fw = uriInfo.getRequestUriBuilder().path(INDEX_HTML).build();
  return Response.temporaryRedirect(fw).build();
}

代码示例来源:origin: org.microprofile-ext.openapi-ext/swagger-ui

@GET
@Produces(MediaType.TEXT_HTML)
@Operation(hidden = true)
public Response getSwaggerUINaked(){
  URI fw = uriInfo.getRequestUriBuilder().path(INDEX_HTML).build();
  return Response.temporaryRedirect(fw).build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extentions/openapi-ext

@GET
@Produces(MediaType.TEXT_HTML)
@Operation(hidden = true)
public Response getSwaggerUINaked(){
  URI fw = uriInfo.getRequestUriBuilder().path(INDEX_HTML).build();
  return Response.temporaryRedirect(fw).build();
}

代码示例来源:origin: com.github.phillip-kruger.microprofile-extentions/config-ext

@GET
@Path("/key/{key}")
@Operation(description = "Getting the value for a certain config key")
@APIResponse(responseCode = "200", description = "Successfull, returning the value")
@Produces(MediaType.TEXT_PLAIN)
public Response getValue(@NotNull 
             @Parameter(name = "key", description = "The key for this config", required = true, allowEmptyValue = false, example = "some.key")
             @PathParam("key") String key) {
  
  return Response.ok(config.getValue(key, String.class)).build();
}

代码示例来源:origin: org.eclipse.microprofile.openapi/microprofile-openapi-tck

@GET
@Path("/inventory")
@Produces({"application/json", "application/xml"})
@APIResponse(
    responseCode = "200", 
    description = "successful operation"
  )
@Operation(
  summary = "Returns pet inventories by status", 
  description = "Returns a map of status codes to quantities"
)
public java.util.Map<String, Integer> getInventory() {
  return petData.getInventoryByStatus();
}

相关文章

Operation类方法