本文整理了Java中com.wordnik.swagger.annotations.Api.<init>()
方法的一些代码示例,展示了Api.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Api.<init>()
方法的具体详情如下:
包路径:com.wordnik.swagger.annotations.Api
类名称:Api
方法名:<init>
暂无
代码示例来源:origin: aol/micro-server
@Path("/stats")
@Component
@Api(value = "/stats", description = "Resource to show stats for a box using sigar")
public class StatsResource implements RestResource {
@GET
@Path("/ping")
@Produces("application/json")
@ApiOperation(value = "Make a ping call", response = List.class)
public List<Integer> getMachineStats() {
return ImmutableList.of(1);
}
}
代码示例来源:origin: com.googlecode.redbox-mint/redbox-web-service
@Api(value = "messaging", description = "Operations to interact with the asynchronous message queue")
public class QueueMessageResource extends RedboxServerResource {
@ApiOperation(value = "Queues a message on the specified message queue", tags = "messaging")
@ApiResponses({ @ApiResponse(code = 200, message = "The record's metadata is updated"),
@ApiResponse(code = 500, message = "General Error", response = Exception.class) })
@Post("json")
public String sendMessageToQueue(JsonRepresentation data) throws IOException, MessagingException {
MessagingServices ms = MessagingServices.getInstance();
String messageQueue = getAttribute("messageQueue");
String message = data.getText();
ms.queueMessage(messageQueue, message);
return getSuccessResponseString(null);
}
}
代码示例来源:origin: com.googlecode.redbox-mint/redbox-web-service
@Api(value = "object", description = "Operations on ReDBox Objects")
public class DeleteObjectResource extends RedboxServerResource {
@ApiOperation(value = "Delete an existing ReDBox object", tags = "object")
@ApiResponses({ @ApiResponse(code = 200, message = "The object is deleted"),
@ApiResponse(code = 500, message = "General Error", response = Exception.class) })
@Delete
public String deleteObjectResource() throws IOException, PluginException, MessagingException {
Storage storage = (Storage) ApplicationContextProvider.getApplicationContext().getBean("fascinatorStorage");
Indexer indexer = (Indexer) ApplicationContextProvider.getApplicationContext().getBean("fascinatorIndexer");
String oid = getAttribute("oid");
storage.removeObject(oid);
indexer.remove(oid);
return getSuccessResponseString(oid);
}
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
/**
* @author Lukas Krejci
* @since 4.10
*/
@Api("Encapsulates a simple boolean value. In XML this is represented as <value value=\"...\"/>")
public final class BooleanValue {
private boolean value;
public BooleanValue() {
}
public BooleanValue(boolean value) {
this.value = value;
}
public boolean isValue() {
return value;
}
public void setValue(boolean value) {
this.value = value;
}
}
代码示例来源:origin: com.googlecode.redbox-mint/redbox-web-service
@Api(value = "listDatastream", description = "List datastreams in an object")
public class ListDatastreamResource extends RedboxServerResource {
@SuppressWarnings("unchecked")
@ApiOperation(value = "List datastreams in an object", tags = "datastream")
@ApiResponses({
@ApiResponse(code = 200, message = "The datastreams are listed"),
@ApiResponse(code = 500, message = "Oid does not exist in storage", response = StorageException.class)
})
@Get("json")
public JsonRepresentation getDatastreamList() throws StorageException, IOException {
Storage storage = (Storage) ApplicationContextProvider.getApplicationContext().getBean("fascinatorStorage");
String oid = getAttribute("oid");
DigitalObject digitalObject = StorageUtils.getDigitalObject(storage, oid);
JsonObject responseObject = getSuccessResponse(oid);
JSONArray dataStreamIds = new JSONArray();
dataStreamIds.addAll(digitalObject.getPayloadIdList());
responseObject.put("datastreamIds", dataStreamIds);
return new JsonRepresentation(new JsonSimple(responseObject).toString(true));
}
}
代码示例来源:origin: GluuFederation/oxAuth
/**
* Provides interface for Client Info REST web services
*
* @author Javier Rojas Blum Date: 07.19.2012
*/
@Api(value = "/", description = "The ClientInfo Endpoint is an OAuth 2.0 Protected Resource that returns Claims about the registered client.")
public interface ClientInfoRestWebService {
@GET
@Path("/clientinfo")
@Produces({MediaType.APPLICATION_JSON})
Response requestClientInfoGet(
@QueryParam("access_token") String accessToken,
@HeaderParam("Authorization") String authorization,
@Context SecurityContext securityContext);
@POST
@Path("/clientinfo")
@Produces({MediaType.APPLICATION_JSON})
Response requestClientInfoPost(
@FormParam("access_token") String accessToken,
@HeaderParam("Authorization") String authorization,
@Context SecurityContext securityContext);
}
代码示例来源:origin: minnal/minnal
/**
* @author ganeshs
*
*/
@Path("/orders")
@Api("/orders")
public class OrderResource {
// @GET
// public Response getOrders() {
// return Response.ok("test").build();
// }
}
代码示例来源:origin: fi.vm.sade.tarjonta/tarjonta-api
/**
*
* @author mlyly
*/
@Path("/v1/export")
@Api(value = "/v1/export", description = "Tarjonnan export rajapinnan operaatiot")
public interface ExportResourceV1 {
@GET
@Path("/kela")
@Produces(MediaType.APPLICATION_JSON + ";charset=UTF-8")
@ApiOperation(value = "Palauttaa hakuehtojen puitteissa hakujen oid:t", notes = "Listaa hakujen oidit", response = OidV1RDTO.class)
public boolean exportKela();
}
代码示例来源:origin: org.graylog2/graylog2-radio
@Api(value = "System/Buffers", description = "Buffer information of this node.")
@Path("/system/buffers")
public class BuffersResource extends RestResource {
private final Configuration configuration;
private final ProcessBuffer processBuffer;
@Inject
public BuffersResource(Configuration configuration, ProcessBuffer processBuffer) {
this.configuration = configuration;
this.processBuffer = processBuffer;
}
@GET
@Timed
@ApiOperation(value = "Get current utilization of buffers and caches of this node.")
@Produces(MediaType.APPLICATION_JSON)
public BuffersUtilizationSummary utilization() {
final int ringSize = configuration.getRingSize();
final long inputSize = processBuffer.getUsage();
final long inputUtil = inputSize / ringSize * 100;
return BuffersUtilizationSummary.create(RingSummary.create(SingleRingUtilization.create(inputSize, inputUtil)));
}
}
代码示例来源:origin: olacabs/fabric
/**
* Todo .
*/
@AllArgsConstructor
@Produces(MediaType.APPLICATION_JSON)
@Path("/instances")
@Api("/instances")
public class ServiceRegistryResource {
private ServiceFinder finder;
@GET
@Timed
@ApiOperation(value = "Returns all service nodes registered for service discovery", response = List.class)
public Response getNodeDetails() {
return Response.ok().entity(ImmutableMap.of("nodes", finder.getAllNodes())).build();
}
}
代码示例来源:origin: liutao910612/TOOL_CAS
/**
* Created by liutao on 2015/8/27.
*/
@RestController
@Api(value = "test")
@RequestMapping("/liutao")
public class UserController {
private Logger logger = LoggerFactory.getLogger(UserController.class);
@Autowired
private UserService userServiceImpl;
@GetMapping(value = "/userInfo")
@ResponseBody
public User getUserInfo(@RequestParam("username") String username) {
logger.debug("second provider");
logger.info("username:"+username);
User user = userServiceImpl.getUserInfo(username);
if(user!=null){
logger.info(user.toString());
}
return user;
}
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/alertDefinitions")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The Alert definitions report")
public interface AlertDefinitionLocal {
@GZIP
@GET
@Produces({"text/csv"})
@ApiOperation(value = "Export the AlertDefinitions as CSV")
StreamingOutput alertDefinitions(@Context HttpServletRequest request);
public StreamingOutput alertDefinitionsInternal(final HttpServletRequest request, Subject user);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/platformUtilization")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The platform utilization report")
public interface PlatformUtilizationLocal {
@GZIP
@GET
@Produces({"text/csv"})
@ApiOperation(value = "Export the Platform utilization data as CSV")
StreamingOutput generateReport(@Context HttpServletRequest request);
public StreamingOutput generateReportInternal(HttpServletRequest request, Subject user);
}
代码示例来源:origin: synyx/urlaubsverwaltung
@Api(value = "VacationOverview", description = "Get Vacation-Overview Metadata")
@RestController("restApiVacationOverview")
@RequestMapping("/api")
public class VacationOverviewController {
private VacationOverviewService vacationOverviewService;
@Autowired
VacationOverviewController(VacationOverviewService vacationOverviewService) {
this.vacationOverviewService = vacationOverviewService;
}
@ApiOperation(
value = "Get Vacation-Overview Metadata",
notes = "Get Vacation-Overview metadata for all members of a department")
@RequestMapping(value = "/vacationoverview", method = RequestMethod.GET)
public ResponseWrapper<VacationOverviewResponse> getHolydayOverview(
@RequestParam("selectedDepartment") String selectedDepartment,
@RequestParam("selectedYear") Integer selectedYear,
@RequestParam("selectedMonth") Integer selectedMonth) {
List<VacationOverview> holidayOverviewList =
vacationOverviewService.getVacationOverviews(selectedDepartment, selectedYear, selectedMonth);
return new ResponseWrapper<>(new VacationOverviewResponse(holidayOverviewList));
}
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/configurationHistory")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The configuration history report")
public interface ConfigurationHistoryLocal {
@GZIP
@GET
@Produces({"text/csv"})
@ApiOperation(value = "Export the Configuration History data as CSV")
StreamingOutput configurationHistory(@Context HttpServletRequest request);
public StreamingOutput configurationHistoryInternal(final HttpServletRequest request, Subject user);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/suspectMetrics")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The suspect metrics report")
public interface SuspectMetricLocal {
@GZIP
@GET
@Produces("text/csv")
@ApiOperation(value = "Export the Suspect Metrics data as CSV")
StreamingOutput suspectMetrics(@Context HttpServletRequest request);
StreamingOutput suspectMetricsInternal(HttpServletRequest request, Subject user);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/driftCompliance")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The drift compliance report")
public interface DriftComplianceLocal {
@GZIP
@GET
@Produces("text/csv")
@ApiOperation(value = "Export the drift compliance data")
StreamingOutput generateReport(
@Context HttpServletRequest request,
@QueryParam("resourceTypeId") String resourceTypeId,
@QueryParam("version") String version);
public StreamingOutput generateReportInternal(
HttpServletRequest request,
String resourceTypeId,
String version, Subject user);
}
代码示例来源:origin: com.sitewhere/sitewhere-rest
/**
* Used purely for global documentation.
*
* @author Derek
*/
@RequestMapping(value = "/overview")
@Api(value = "overview", description = "REST Services Overview")
@DocumentedController(name = "Overview", global = true)
public class Overview {
@RequestMapping(value = "/overview/calling", method = RequestMethod.GET)
@ApiOperation(value = "Calling SiteWhere REST Services")
@Documented
public void calling() {
}
@RequestMapping(value = "/overview/paging", method = RequestMethod.GET)
@ApiOperation(value = "Paged Results")
@Documented
public void paging() {
}
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/recentOperations")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The recent operations report")
public interface RecentOperationsLocal {
@GZIP
@GET
@Produces({"text/csv"})
@ApiOperation(value = "Export the Recent Operations Data as CSV")
StreamingOutput recentOperations(
@QueryParam("status") @DefaultValue("inprogress,success,failure,canceled") String operationRequestStatus,
@QueryParam("startTime") Long startTime,
@QueryParam("endTime") Long endTime,
@Context HttpServletRequest request);
StreamingOutput recentOperationsInternal(
String operationRequestStatus,
Long startTime,
Long endTime,
HttpServletRequest request,
Subject user);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Path("/recentAlerts")
@Local
@Api(basePath="http://localhost:7080/coregui/reports", value = "The recent alerts report")
public interface RecentAlertLocal {
@GZIP
@GET
@Produces({"text/csv"})
@ApiOperation(value = "Export the Recent Alert data as CSV")
StreamingOutput recentAlerts(
@QueryParam("alertPriority") @DefaultValue("high,medium,low") String alertPriority,
@QueryParam("startTime") Long startTime,
@QueryParam("endTime") Long endTime,
@Context HttpServletRequest request);
StreamingOutput recentAlertsInternal(
String alertPriority,
Long startTime,
Long endTime,
HttpServletRequest request,
Subject user
);
}
内容来源于网络,如有侵权,请联系作者删除!