Skip to content

Commit

Permalink
jaxrs: Add swagger @Api tags attribute -- used for nice naming on cli…
Browse files Browse the repository at this point in the history
…ent code generation
  • Loading branch information
sbrossie committed Feb 25, 2018
1 parent b60fd02 commit afa23a5
Show file tree
Hide file tree
Showing 24 changed files with 27 additions and 27 deletions.
Expand Up @@ -146,7 +146,7 @@

@Singleton
@Path(JaxrsResource.ACCOUNTS_PATH)
@Api(value = JaxrsResource.ACCOUNTS_PATH, description = "Operations on accounts")
@Api(value = JaxrsResource.ACCOUNTS_PATH, description = "Operations on accounts", tags="Account")
public class AccountResource extends JaxRsResourceBase {

private static final String ID_PARAM_NAME = "accountId";
Expand Down
Expand Up @@ -105,7 +105,7 @@

@Singleton
@Path(JaxrsResource.ADMIN_PATH)
@Api(value = JaxrsResource.ADMIN_PATH, description = "Admin operations (will require special privileges)")
@Api(value = JaxrsResource.ADMIN_PATH, description = "Admin operations (will require special privileges)", tags="Admin")
public class AdminResource extends JaxRsResourceBase {

private static final String OK = "OK";
Expand Down
Expand Up @@ -86,7 +86,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.BUNDLES_PATH)
@Api(value = JaxrsResource.BUNDLES_PATH, description = "Operations on bundles")
@Api(value = JaxrsResource.BUNDLES_PATH, description = "Operations on bundles", tags="Bundle")
public class BundleResource extends JaxRsResourceBase {

private static final String ID_PARAM_NAME = "bundleId";
Expand Down
Expand Up @@ -91,7 +91,7 @@

@Singleton
@Path(JaxrsResource.CATALOG_PATH)
@Api(value = JaxrsResource.CATALOG_PATH, description = "Catalog information")
@Api(value = JaxrsResource.CATALOG_PATH, description = "Catalog information", tags="Catalog")
public class CatalogResource extends JaxRsResourceBase {

private final CatalogUserApi catalogUserApi;
Expand Down
Expand Up @@ -62,7 +62,7 @@

@Singleton
@Path(JaxrsResource.CREDITS_PATH)
@Api(value = JaxrsResource.CREDITS_PATH, description = "Operations on credits")
@Api(value = JaxrsResource.CREDITS_PATH, description = "Operations on credits", tags="Credit")
public class CreditResource extends JaxRsResourceBase {

private final InvoiceUserApi invoiceUserApi;
Expand Down
Expand Up @@ -57,7 +57,7 @@

@Singleton
@Path(JaxrsResource.CUSTOM_FIELDS_PATH)
@Api(value = JaxrsResource.CUSTOM_FIELDS_PATH, description = "Operations on custom fields")
@Api(value = JaxrsResource.CUSTOM_FIELDS_PATH, description = "Operations on custom fields", tags="CustomField")
public class CustomFieldResource extends JaxRsResourceBase {

@Inject
Expand Down
Expand Up @@ -52,7 +52,7 @@

@Singleton
@Path(JaxrsResource.EXPORT_PATH)
@Api(value = JaxrsResource.EXPORT_PATH, description = "Export endpoints")
@Api(value = JaxrsResource.EXPORT_PATH, description = "Export endpoints", tags="Export")
public class ExportResource extends JaxRsResourceBase {

private final ExportUserApi exportUserApi;
Expand Down
Expand Up @@ -64,7 +64,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.INVOICES_ITEMS_PATH)
@Api(value = JaxrsResource.INVOICES_ITEMS_PATH, description = "Operations on invoice items")
@Api(value = JaxrsResource.INVOICES_ITEMS_PATH, description = "Operations on invoice items", tags="InvoiceItem")
public class InvoiceItemResource extends JaxRsResourceBase {
private static final String ID_PARAM_NAME = "invoiceItemId";

Expand Down
Expand Up @@ -88,7 +88,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.INVOICE_PAYMENTS_PATH)
@Api(value = JaxrsResource.INVOICE_PAYMENTS_PATH, description = "Operations on invoice payments")
@Api(value = JaxrsResource.INVOICE_PAYMENTS_PATH, description = "Operations on invoice payments", tags="InvoicePayment")
public class InvoicePaymentResource extends JaxRsResourceBase {

private static final String ID_PARAM_NAME = "paymentId";
Expand Down
Expand Up @@ -127,7 +127,7 @@
import static javax.ws.rs.core.MediaType.TEXT_PLAIN;

@Path(JaxrsResource.INVOICES_PATH)
@Api(value = JaxrsResource.INVOICES_PATH, description = "Operations on invoices")
@Api(value = JaxrsResource.INVOICES_PATH, description = "Operations on invoices", tags="Invoice")
public class InvoiceResource extends JaxRsResourceBase {

private static final Logger log = LoggerFactory.getLogger(InvoiceResource.class);
Expand Down Expand Up @@ -322,9 +322,9 @@ public Response createFutureInvoice(@QueryParam(QUERY_ACCOUNT_ID) final String a
@Path("/" + MIGRATION + "/{accountId:" + UUID_PATTERN + "}")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
@ApiOperation(value = "Create a migration invoice", response = InvoiceJson.class)
@ApiOperation(value = "Create a migration invoice", response = InvoiceJson.class, tags="Invoice")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id or target datetime supplied")})
public Response createMigrationInvoice(final Iterable<InvoiceItemJson> items,
public Response createMigrationInvoice(final List<InvoiceItemJson> items,
@PathParam("accountId") final String accountIdStr,
@Nullable @QueryParam(QUERY_TARGET_DATE) final String targetDate,
@HeaderParam(HDR_CREATED_BY) final String createdBy,
Expand Down Expand Up @@ -489,7 +489,7 @@ public Response adjustInvoiceItem(final InvoiceItemJson json,
@ApiOperation(value = "Create external charge(s)", response = InvoiceItemJson.class, responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid account id supplied"),
@ApiResponse(code = 404, message = "Account not found")})
public Response createExternalCharges(final Iterable<InvoiceItemJson> externalChargesJson,
public Response createExternalCharges(final List<InvoiceItemJson> externalChargesJson,
@PathParam("accountId") final String accountIdStr,
@QueryParam(QUERY_REQUESTED_DT) final String requestedDateTimeString,
@QueryParam(QUERY_PAY_INVOICE) @DefaultValue("false") final Boolean payInvoice,
Expand Down
Expand Up @@ -72,7 +72,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.NODES_INFO_PATH)
@Api(value = JaxrsResource.NODES_INFO_PATH, description = "Operations to retrieve nodes info")
@Api(value = JaxrsResource.NODES_INFO_PATH, description = "Operations to retrieve nodes info", tags="NodesInfo")
public class NodesInfoResource extends JaxRsResourceBase {

private final KillbillNodesApi killbillInfoApi;
Expand Down
Expand Up @@ -61,7 +61,7 @@

@Singleton
@Path(JaxrsResource.OVERDUE_PATH)
@Api(value = JaxrsResource.OVERDUE_PATH, description = "Overdue information")
@Api(value = JaxrsResource.OVERDUE_PATH, description = "Overdue information", tags="Overdue")
public class OverdueResource extends JaxRsResourceBase {

private final OverdueApi overdueApi;
Expand Down
Expand Up @@ -67,7 +67,7 @@

@Singleton
@Path(JaxrsResource.PAYMENT_GATEWAYS_PATH)
@Api(value = JaxrsResource.PAYMENT_GATEWAYS_PATH, description = "HPP endpoints")
@Api(value = JaxrsResource.PAYMENT_GATEWAYS_PATH, description = "HPP endpoints", tags="PaymentGateway")
public class PaymentGatewayResource extends ComboPaymentResource {

private final PaymentGatewayApi paymentGatewayApi;
Expand Down
Expand Up @@ -78,7 +78,7 @@

@Singleton
@Path(JaxrsResource.PAYMENT_METHODS_PATH)
@Api(value = JaxrsResource.PAYMENT_METHODS_PATH, description = "Operations on payment methods")
@Api(value = JaxrsResource.PAYMENT_METHODS_PATH, description = "Operations on payment methods", tags="PaymentMethod")
public class PaymentMethodResource extends JaxRsResourceBase {

@Inject
Expand Down
Expand Up @@ -87,7 +87,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.PAYMENTS_PATH)
@Api(value = JaxrsResource.PAYMENTS_PATH, description = "Operations on payments")
@Api(value = JaxrsResource.PAYMENTS_PATH, description = "Operations on payments", tags="Payment")
public class PaymentResource extends ComboPaymentResource {

private static final String ID_PARAM_NAME = "paymentId";
Expand Down
Expand Up @@ -48,7 +48,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.PLUGINS_INFO_PATH)
@Api(value = JaxrsResource.PLUGINS_INFO_PATH, description = "Operations on plugins")
@Api(value = JaxrsResource.PLUGINS_INFO_PATH, description = "Operations on plugins", tags="PluginInfo")
public class PluginInfoResource extends JaxRsResourceBase {

private final PluginsInfoApi pluginsInfoApi;
Expand Down
Expand Up @@ -65,7 +65,7 @@

@Singleton
@Path(JaxrsResource.SECURITY_PATH)
@Api(value = JaxrsResource.SECURITY_PATH, description = "Information about RBAC")
@Api(value = JaxrsResource.SECURITY_PATH, description = "Information about RBAC", tags="Security")
public class SecurityResource extends JaxRsResourceBase {

private final SecurityApi securityApi;
Expand Down
Expand Up @@ -115,7 +115,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.SUBSCRIPTIONS_PATH)
@Api(value = JaxrsResource.SUBSCRIPTIONS_PATH, description = "Operations on subscriptions")
@Api(value = JaxrsResource.SUBSCRIPTIONS_PATH, description = "Operations on subscriptions", tags="Subscription")
public class SubscriptionResource extends JaxRsResourceBase {

private static final Logger log = LoggerFactory.getLogger(SubscriptionResource.class);
Expand Down
Expand Up @@ -64,7 +64,7 @@

@Singleton
@Path(JaxrsResource.TAG_DEFINITIONS_PATH)
@Api(value = JaxrsResource.TAG_DEFINITIONS_PATH, description = "Operations on tag definitions")
@Api(value = JaxrsResource.TAG_DEFINITIONS_PATH, description = "Operations on tag definitions", tags="TagDefinition")
public class TagDefinitionResource extends JaxRsResourceBase {

@Inject
Expand Down
Expand Up @@ -61,7 +61,7 @@

@Singleton
@Path(JaxrsResource.TAGS_PATH)
@Api(value = JaxrsResource.TAGS_PATH, description = "Operations on tags")
@Api(value = JaxrsResource.TAGS_PATH, description = "Operations on tags", tags="Tag")
public class TagResource extends JaxRsResourceBase {

@Inject
Expand Down
Expand Up @@ -75,7 +75,7 @@

@Singleton
@Path(JaxrsResource.TENANTS_PATH)
@Api(value = JaxrsResource.TENANTS_PATH, description = "Operations on tenants")
@Api(value = JaxrsResource.TENANTS_PATH, description = "Operations on tenants", tags="Tenant")
public class TenantResource extends JaxRsResourceBase {

private final TenantUserApi tenantApi;
Expand Down
Expand Up @@ -90,7 +90,7 @@
//
//
@Path(JaxrsResource.TEST_PATH)
@Api(value = JaxrsResource.TEST_PATH, description = "Operations for testing")
@Api(value = JaxrsResource.TEST_PATH, description = "Operations for testing", hidden=true)
public class TestResource extends JaxRsResourceBase {

private static final Logger log = LoggerFactory.getLogger(TestResource.class);
Expand Down
Expand Up @@ -73,7 +73,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;

@Path(JaxrsResource.PAYMENT_TRANSACTIONS_PATH)
@Api(value = JaxrsResource.PAYMENT_TRANSACTIONS_PATH, description = "Operations on payment transactions")
@Api(value = JaxrsResource.PAYMENT_TRANSACTIONS_PATH, description = "Operations on payment transactions", tags="PaymentTransaction")
public class TransactionResource extends JaxRsResourceBase {

private static final String ID_PARAM_NAME = "transactionId";
Expand Down
Expand Up @@ -72,7 +72,7 @@

@Singleton
@Path(JaxrsResource.USAGES_PATH)
@Api(value = JaxrsResource.USAGES_PATH, description = "Operations on usage")
@Api(value = JaxrsResource.USAGES_PATH, description = "Operations on usage", tags="Usage")
public class UsageResource extends JaxRsResourceBase {

private final UsageUserApi usageUserApi;
Expand Down

0 comments on commit afa23a5

Please sign in to comment.