当前位置: 首页>>代码示例>>Java>>正文


Java ExtensionProperty类代码示例

本文整理汇总了Java中io.swagger.annotations.ExtensionProperty的典型用法代码示例。如果您正苦于以下问题:Java ExtensionProperty类的具体用法?Java ExtensionProperty怎么用?Java ExtensionProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExtensionProperty类属于io.swagger.annotations包,在下文中一共展示了ExtensionProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: list

import io.swagger.annotations.ExtensionProperty; //导入依赖的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.ExtensionProperty; //导入依赖的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.ExtensionProperty; //导入依赖的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.ExtensionProperty; //导入依赖的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.ExtensionProperty; //导入依赖的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.ExtensionProperty; //导入依赖的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: orderCoffee

import io.swagger.annotations.ExtensionProperty; //导入依赖的package包/类
@Path("device/ordercoffee")
@POST
@ApiOperation(
        consumes = MediaType.APPLICATION_JSON,
        httpMethod = "POST",
        value = "Order Coffee",
        notes = "",
        response = Response.class,
        tags = "connectedcup",
        extensions = {
                @Extension(properties = {
                        @ExtensionProperty(name = SCOPE, value = "perm:connectedcup:enroll")
                })
        }
)
Response orderCoffee(@QueryParam("deviceId") String deviceId);
 
开发者ID:wso2,项目名称:product-iots,代码行数:17,代码来源:ConnectedCupService.java

示例8: testBase

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例9: getGreeting

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例10: get

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例11: get

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例12: transactions

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例13: get

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例14: list

import io.swagger.annotations.ExtensionProperty; //导入依赖的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

示例15: get

import io.swagger.annotations.ExtensionProperty; //导入依赖的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


注:本文中的io.swagger.annotations.ExtensionProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。