本文整理汇总了Java中io.swagger.annotations.Extension类的典型用法代码示例。如果您正苦于以下问题:Java Extension类的具体用法?Java Extension怎么用?Java Extension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Extension类属于io.swagger.annotations包,在下文中一共展示了Extension类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: list
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Produces({"application/hal+json", "application/hal+json;concept=customers;v=1"})
@ApiOperation(value = "lists customers", response = CustomersRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "advisor", value = "advisors are allowed getting every customer"),
@ExtensionProperty(name = "customer", value = "customer only allowed getting own information")}
)},
produces = "application/hal+json, application/hal+json;concept=customers;v=1",
notes = "List all customers in a default projection, which is Customers version 1" +
"Supported projections and versions are: " +
"Customers in version 1 " +
"The Accept header for the default version is application/hal+json;concept=customers;v=1.0.0.... " +
"The format for the default version is {....}", nickname = "listCustomers")
@ApiResponses(value = {
@ApiResponse(code = 415, message = "Content type not supported.")
})
public Response list(@Context UriInfo uriInfo, @Context Request request, @HeaderParam("Accept") String accept) {
return customersProducers.getOrDefault(accept, this::handleUnsupportedContentType).getResponse(uriInfo, request);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:27,代码来源:CustomerServiceExposure.java
示例2: list
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Produces({"application/hal+json", "application/hal+json;concept=accountoverview;v=1"})
@ApiOperation(value = "lists accounts", response = AccountsRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "advisor", value = "advisors are allowed getting every account"),
@ExtensionProperty(name = "customer", value = "customer only allowed getting own accounts")}
)},
produces = "application/hal+json, application/hal+json;concept=accountoverview;v=1",
notes = "List all accounts in a default projection, which is AccountOverview version 1" +
"Supported projections and versions are: " +
"AccountOverview in version 1 " +
"The Accept header for the default version is application/hal+json;concept=AccountOverview;v=1.0.0.... " +
"The format for the default version is {....}", nickname = "listAccounts")
@ApiResponses(value = {
@ApiResponse(code = 415, message = "Content type not supported.")
})
public Response list(@Context UriInfo uriInfo, @Context Request request, @QueryParam("customer") @DefaultValue("0") String customer, @HeaderParam("Accept") String accept) {
return accountsProducers.getOrDefault(accept, this::handleUnsupportedContentType).getResponse(uriInfo, request, customer);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:27,代码来源:AccountServiceExposure.java
示例3: list
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Produces({"application/hal+json", "application/hal+json;concept=location;v=1"})
@ApiOperation(value = "lists locations", response = LocationsRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "advisor", value = "advisors are allowed getting every location"),
@ExtensionProperty(name = "customer", value = "customer only allowed getting own locations")}
)},
produces = "application/hal+json, application/hal+json;concept=locations;v=1",
notes = "List all locations in a default projection, which is Location version 1" +
"Supported projections and versions are: " +
"Locations in version 1 " +
"The Accept header for the default version is application/hal+json;concept=location;v=1.0.0.... " +
"The format for the default version is {....}", nickname = "listLocations")
@ApiResponses(value = {
@ApiResponse(code = 415, message = "Content type not supported.")
})
public Response list(@Context UriInfo uriInfo, @Context Request request, @HeaderParam("Accept") String accept) {
return locationsProducers.getOrDefault(accept, this::handleUnsupportedContentType).getResponse(uriInfo, request);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:27,代码来源:LocationServiceExposure.java
示例4: list
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Produces({"application/hal+json", "application/hal+json;concept=virtualaccount;v=1"})
@ApiOperation(value = "lists accounts", response = VirtualAccountsRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "advisor", value = "advisors are allowed getting every virtualaccount"),
@ExtensionProperty(name = "customer", value = "customer only allowed getting own locations")}
)},
produces = "application/hal+json, application/hal+json;concept=locations;v=1",
notes = "List all locations in a default projection, which is VirtualAccount version 1" +
"Supported projections and versions are: " +
"VirtualAccounts in version 1 " +
"The Accept header for the default version is application/hal+json;concept=virtualaccount;v=1.0.0.... " +
"The format for the default version is {....}", nickname = "listVirtualAccounts")
@ApiResponses(value = {
@ApiResponse(code = 415, message = "Content type not supported.")
})
public Response list(@Context UriInfo uriInfo, @Context Request request, @HeaderParam("Accept") String accept) {
return accountsProducer.getOrDefault(accept, this::handleUnsupportedContentType).getResponse(uriInfo, request);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:27,代码来源:VirtualAccountServiceExposure.java
示例5: getSensorStats
import io.swagger.annotations.Extension; //导入依赖的package包/类
/**
* Retrieve Sensor data for the given time period.
*
* @param deviceId unique identifier for given device type instance
* @param from starting time
* @param to ending time
* @return response with List<SensorRecord> object which includes sensor data which is requested
*/
@Path("device/stats/{deviceId}")
@GET
@Consumes("application/json")
@Produces("application/json")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
httpMethod = "GET",
value = "Sensor Stats",
notes = "",
response = Response.class,
tags = "sampledevice",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:sampledevice:enroll")
})
}
)
Response getSensorStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from,
@QueryParam("to") long to, @QueryParam("sensorType") String sensorType);
开发者ID:wso2,项目名称:product-iots,代码行数:28,代码来源:DeviceTypeService.java
示例6: getDeviceStats
import io.swagger.annotations.Extension; //导入依赖的package包/类
/**
* Retrieve Sensor data for the device type
*/
@Path("stats/{deviceId}/sensors/{sensorName}")
@GET
@Consumes("application/json")
@Produces("application/json")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
httpMethod = "GET",
value = "Retrieve Sensor data for the device type",
notes = "",
response = Response.class,
tags = "connectedcup",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:connectedcup:enroll")
})
}
)
Response getDeviceStats(@PathParam("deviceId") String deviceId, @PathParam("sensorName") String sensor,
@QueryParam("from") long from, @QueryParam("to") long to);
开发者ID:wso2,项目名称:product-iots,代码行数:23,代码来源:ConnectedCupService.java
示例7: testBase
import io.swagger.annotations.Extension; //导入依赖的package包/类
@ApiOperation(
value = "summary",
notes = "notes",
tags = {"tag1", "tag2"},
httpMethod = "GET",
nickname = "test",
produces = "application/json",
consumes = "application/json",
protocols = "http,https",
code = 202,
responseHeaders = {@ResponseHeader(name = "h1", response = int.class)},
extensions = {@Extension(
name = "x-tagA",
properties = {@ExtensionProperty(name = "x-tagAExt", value = "value of tagAExt")})})
void testBase();
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:16,代码来源:TestApiOperation.java
示例8: getGreeting
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("/test/")
@ApiOperation(value = "Test",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = "externalPath", value = "/hello-world/v1/")
})})
public Response getGreeting() {
return Response.ok("Test").build();
}
开发者ID:minijax,项目名称:minijax,代码行数:11,代码来源:ResourceWithExtensions.java
示例9: get
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("{virtualAccountNumber}")
@Produces({"application/hal+json", "application/hal+json;concept=virtualaccount;v=1", "application/hal+json;concept=virtualaccount;v=2"})
@ApiOperation(value = "gets the information from a single position", response = VirtualAccountRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting own information"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting all information")}
)},
produces = "application/hal+json, application/hal+json;concept=virtualaccount;v=1, application/hal+json;concept=virtualaccount;v=2",
notes = "obtain a single customer back in a default projection, which is VirtualAccount version 2" +
" Supported projections and versions are:" +
" VirtualAccount in version1 and VirtualAccount in version 2" +
" The format of the default version is .... - The Accept Header is not marked as required in the " +
"swagger - but it is needed - we are working on a solution to that", nickname = "getVirtualAccount")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "virtualaccount not found.")
})
public Response get(@Context UriInfo uriInfo, @Context Request request,
@PathParam("virtualAccountNumber") @Pattern(regexp = "^[0-9]*$") String virtualAccountNumber,
@HeaderParam("Accept") String accept) {
LOGGER.info("Default version of virtualaccount collected");
return accountProducers.getOrDefault(accept, this::handleUnsupportedContentType)
.getResponse(uriInfo, request, virtualAccountNumber);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:32,代码来源:VirtualAccountServiceExposure.java
示例10: get
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("{customerNo}")
@Produces({"application/hal+json", "application/hal+json;concept=customer;v=1", "application/hal+json;concept=customer;v=2"})
@ApiOperation(value = "gets the information from a single customer", response = CustomerRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting own information"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting all information")}
)},
produces = "application/hal+json, application/hal+json;concept=customer;v=1, application/hal+json;concept=customer;v=2",
notes = "obtain a single customer back in a default projection, which is Customer version 2" +
" Supported projections and versions are:" +
" Customer in version1 and Customer in version 2" +
" The format of the default version is .... - The Accept Header is not marked as required in the " +
"swagger - but it is needed - we are working on a solution to that", nickname = "getCustomer")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "No customer found.")
})
public Response get(@Context UriInfo uriInfo, @Context Request request,
@PathParam("customerNo") @Pattern(regexp = "^[0-9]{10}$") String customerNo,
@HeaderParam("Accept") String accept) {
LOGGER.info("Default version of customer collected");
return customerProducers.getOrDefault(accept, this::handleUnsupportedContentType).getResponse(uriInfo, request, customerNo);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:31,代码来源:CustomerServiceExposure.java
示例11: transactions
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Produces({ "application/hal+json", "application/hal+json;concept=reconciledtransactions;v=1"})
@ApiOperation(value = "obtain reconciled transactions (added API capabilities not though not implemented)",
response = ReconciledTransactionsRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting from own account"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting from every account")}
)},
tags = {"select", "sort", "elements", "interval", "filter", "embed", "decorator", "reconciled"},
notes = "obtain a list of all reconciled transactions from an account" +
"the reconciled transactions are user controlled checks and notes for transactions " +
"such as - Yes I have verified that this transaction was correct and thus it is reconciled",
produces = "application/hal+json, application/hal+json;concept=reconciledtransactions;v=1",
nickname = "listReconciledTransactions")
@ApiResponses(value = {
@ApiResponse(code = 415, message = "Content type not supported.")
})
public Response list(@Context UriInfo uriInfo, @Context Request request,
@HeaderParam("Accept") String accept, @PathParam("regNo") String regNo, @PathParam("accountNo") String accountNo
) {
return reconciledTxsProducers.getOrDefault(accept, this::handleUnsupportedContentType)
.getResponse(uriInfo, request, regNo, accountNo);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:31,代码来源:ReconciledTransactionServiceExposure.java
示例12: get
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("{id}")
@Produces({ "application/hal+json", "application/hal+json;concept=reconciledtransaction;v=1" })
@LogDuration(limit = 50)
@ApiOperation(value = "obtain a single reconciled transaction from a given account", response = ReconciledTransactionRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting own account")}
)},
produces = "application/hal+json, application/hal+json;concept=reconciledtransaction;v=1",
nickname = "getReconciledTransaction")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "No reconciled transaction found."),
@ApiResponse(code = 415, message = "Content type not supported.")
})
public Response get(@Context UriInfo uriInfo, @Context Request request,
@HeaderParam("Accept") String accept, @PathParam("regNo") String regNo,
@PathParam("accountNo") String accountNo, @PathParam("id") String id) {
return reconciledTxProducers.getOrDefault(accept, this::handleUnsupportedContentType)
.getResponse(uriInfo, request, regNo, accountNo, id);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:29,代码来源:ReconciledTransactionServiceExposure.java
示例13: list
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Produces({ "application/hal+json", "application/hal+json;concept=transactionoverview;v=1" })
@ApiOperation(
value = "obtain all transactions on account for a given account", response = TransactionsRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting from own account"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting from every account")}
)},
tags = {"sort", "elements", "interval", "transactions"},
produces = "application/hal+json, application/hal+json;concept=transactionoverview;v=1",
nickname = "listTransactions"
)
public Response list(@Context UriInfo uriInfo, @Context Request request,
@HeaderParam("Accept") String accept, @PathParam("regNo") String regNo,
@PathParam("accountNo") String accountNo,
@QueryParam("sort") String sort, @QueryParam("elements") String elements,
@QueryParam("interval") String interval) {
return transactionsProducers.getOrDefault(accept, this::handleUnsupportedContentType)
.getResponse(uriInfo, request, regNo, accountNo, sort, elements, interval);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:28,代码来源:TransactionServiceExposure.java
示例14: get
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("{id}")
@Produces({ "application/hal+json", "application/hal+json;concept=transaction;v=1"})
@LogDuration(limit = 50)
@ApiOperation(
value = "obtain the individual single transaction from an account", response = TransactionRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting from own account"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting from every account")}
)},
produces = "application/hal+json, application/hal+json;concept=transaction;v=1",
nickname = "getTransaction")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "No transaction found."),
@ApiResponse(code = 415, message = "Content type not supported.")
})
/**
* the use of authorization scopes to signal roles is a bit dubious and thus this may change in the future
*/
public Response get(@Context UriInfo uriInfo, @Context Request request,
@HeaderParam("Accept") String accept,
@PathParam("regNo") String regNo,
@PathParam("accountNo") String accountNo,
@PathParam("id") String id) {
return transactionProducers.getOrDefault(accept, this::handleUnsupportedContentType)
.getResponse(uriInfo, request, regNo, accountNo, id);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:35,代码来源:TransactionServiceExposure.java
示例15: get
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("{regNo}-{accountNo}")
@Produces({"application/hal+json", "application/hal+json;concept=account;v=1", "application/hal+json;concept=account;v=2"})
@ApiOperation(value = "gets the information from a single account", response = AccountRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting own account"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting every account")}
)},
produces = "application/hal+json, application/hal+json;concept=account;v=1, application/hal+json;concept=account;v=2",
notes = "obtain a single account back in a default projection, which is Account version 2" +
" Supported projections and versions are:" +
" AccountSparse in version1 and Account in version 2" +
" The format of the default version is .... - The Accept Header is not marked as required in the " +
"swagger - but it is needed - we are working on a solution to that", nickname = "getAccount")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "No account found.")
})
public Response get(@Context UriInfo uriInfo, @Context Request request,
@PathParam("regNo") @Pattern(regexp = "^[0-9]{4}$") String regNo,
@PathParam("accountNo") @Pattern(regexp = "^[0-9]+$") String accountNo,
@HeaderParam("Accept") String accept) {
LOGGER.info("Default version of account collected");
return accountProducers.getOrDefault(accept, this::handleUnsupportedContentType).getResponse(uriInfo, request, regNo, accountNo);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:32,代码来源:AccountServiceExposure.java
示例16: get
import io.swagger.annotations.Extension; //导入依赖的package包/类
@GET
@Path("{latitude}-{longitude}")
@Produces({"application/hal+json", "application/hal+json;concept=location;v=1", "application/hal+json;concept=location;v=2"})
@ApiOperation(value = "gets the information from a single position", response = LocationRepresentation.class,
authorizations = {
@Authorization(value = "oauth2", scopes = {}),
@Authorization(value = "oauth2-cc", scopes = {}),
@Authorization(value = "oauth2-ac", scopes = {}),
@Authorization(value = "oauth2-rop", scopes = {}),
@Authorization(value = "Bearer")
},
extensions = {@Extension(name = "roles", properties = {
@ExtensionProperty(name = "customer", value = "customer allows getting own information"),
@ExtensionProperty(name = "advisor", value = "advisor allows getting all information")}
)},
produces = "application/hal+json, application/hal+json;concept=location;v=1, application/hal+json;concept=location;v=2",
notes = "obtain a single customer back in a default projection, which is Location version 2" +
" Supported projections and versions are:" +
" Location in version1 and Location in version 2" +
" The format of the default version is .... - The Accept Header is not marked as required in the " +
"swagger - but it is needed - we are working on a solution to that", nickname = "getLocation")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "location not found.")
})
public Response get(@Context UriInfo uriInfo, @Context Request request,
@PathParam("latitude") @Pattern(regexp = "^[0-9]+.[0-9]+,[0-9]*$") String latitude,
@PathParam("longitude") @Pattern(regexp = "^[0-9]+.[0-9]+,[0-9]*$") String longitude,
@HeaderParam("Accept") String accept) {
LOGGER.info("Default version of location collected");
return locationProducers.getOrDefault(accept, this::handleUnsupportedContentType)
.getResponse(uriInfo, request, latitude, longitude);
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:33,代码来源:LocationServiceExposure.java
示例17: getVendorExtensions
import io.swagger.annotations.Extension; //导入依赖的package包/类
private List<VendorExtension> getVendorExtensions() {
Extension[] extensions = springfoxLoader.extensions();
if (extensions.length == 1 && StringUtils.isEmpty(extensions[0].name())) {
return Collections.emptyList();
}
return Arrays.stream(extensions).map(extension -> {
ExtensionProperty[] extensionProperties = extension.properties();
List<StringVendorExtension> vendorExtensions = Arrays.stream(extensionProperties)
.map(property -> new StringVendorExtension(property.name(), property.value())).collect(Collectors.toList());
ObjectVendorExtension vendorExtension = new ObjectVendorExtension(extension.name());
vendorExtensions.forEach(vendorExtension::addProperty);
return vendorExtension;
}).collect(Collectors.toList());
}
开发者ID:jarlehansen,项目名称:springfox-loader,代码行数:16,代码来源:SpringfoxLoaderConfig.java
示例18: removeCertificate
import io.swagger.annotations.Extension; //导入依赖的package包/类
@DELETE
@Path("/{serialNumber}")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "DELETE",
value = "Deleting an SSL Certificate",
notes = "Delete an SSL certificate that's on the client end.",
tags = "Certificate Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:admin:certificates:delete")
})
}
)
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully removed the certificate."),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 404,
message = "Not Found. \n The specified resource does not exist."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while removing the certificate.",
response = ErrorResponse.class)})
Response removeCertificate(
@ApiParam(
name = "serialNumber",
value = "The serial number of the certificate.\n" +
"NOTE: Make sure that a certificate with the serial number you provide exists in the server. If not, first add a certificate.",
required = true,
defaultValue = "12438035315552875930")
@PathParam("serialNumber") String serialNumber);
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:40,代码来源:CertificateManagementAdminService.java
示例19: isAuthorizedForStat
import io.swagger.annotations.Extension; //导入依赖的package包/类
@POST
@Path("/stat")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "POST",
value = "Check for device access authorization for stat\n",
notes = "This is an internal API that can be used to check for authorization.",
response = DeviceAuthorizationResult.class,
tags = "Authorization Administrative Service",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:authorization:verify")
})
})
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Authorized device list will be delivered to the requested services",
response = DeviceAuthorizationResult.class),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 404,
message = "Not Found. \n The specified resource does not exist."),
@ApiResponse(
code = 415,
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n Server error occurred while checking the authorization" +
" for a specified set of devices.",
response = ErrorResponse.class)
})
Response isAuthorizedForStat(AuthorizationRequest authorizationRequest);
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:39,代码来源:DeviceAccessAuthorizationAdminService.java
示例20: disEnrollDevice
import io.swagger.annotations.Extension; //导入依赖的package包/类
@DELETE
@Path("/enroll/{type}/{id}")
@ApiOperation(
httpMethod = "DELETE",
value = "Unregistering a Device",
notes = "Use this REST API to unregister a device.",
tags = "Device Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:device:disenroll")
})
}
)
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully disenrolled the device."),
@ApiResponse(
code = 404,
message = "Not Found. \n The specified resource does not exist."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while dis-enrolling the device.")
})
Response disEnrollDevice(
@ApiParam(name = "type", value = "The unique device identifier.") @PathParam("type") String type,
@ApiParam(name = "id", value = "The unique device identifier.") @PathParam("id") String id);
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:29,代码来源:DeviceAgentService.java
注:本文中的io.swagger.annotations.Extension类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论