SwaggerRouter { public static Router swaggerRouter(Router baseRouter, Swagger swagger, EventBus eventBus) { return swaggerRouter(baseRouter, swagger, eventBus, new DefaultServiceIdResolver(), null); }  static Router swaggerRouter(Router baseRouter, Swagger swagger, EventBus eventBus); static Router swaggerRouter(Router baseRouter, Swagger swagger, EventBus eventBus, ServiceIdResolver serviceIdResolver); static Router swaggerRouter(Router baseRouter, Swagger swagger, EventBus eventBus, ServiceIdResolver serviceIdResolver, Function<RoutingContext, DeliveryOptions> configureMessage); static User extractAuthUserFromMessage(Message<?> message); static final String CUSTOM_STATUS_CODE_HEADER_KEY; static final String CUSTOM_STATUS_MESSAGE_HEADER_KEY; static final String AUTH_USER_HEADER_KEY; static final String AUTH_PROVIDER_NAME_HEADER_KEY; }
@Test(expected = IllegalArgumentException.class) public void testIllegalPathParameterName() { String definition = definitions.getJsonObject(0).encode(); Swagger swagger = new SwaggerParser().parse(definition); SwaggerRouter.swaggerRouter(Router.router(vertx), swagger, eventBus); }
@Test(expected = IllegalArgumentException.class) public void testEmptyPathParameterName() { String definition = definitions.getJsonObject(1).encode(); Swagger swagger = new SwaggerParser().parse(definition); SwaggerRouter.swaggerRouter(Router.router(vertx), swagger, eventBus); }
@Test(expected = IllegalArgumentException.class) public void testNumericPathParameterName() { String definition = definitions.getJsonObject(2).encode(); Swagger swagger = new SwaggerParser().parse(definition); SwaggerRouter.swaggerRouter(Router.router(vertx), swagger, eventBus); }
@Test(expected = IllegalArgumentException.class) public void testPathParameterNameStartsWithNumber() { String definition = definitions.getJsonObject(3).encode(); Swagger swagger = new SwaggerParser().parse(definition); SwaggerRouter.swaggerRouter(Router.router(vertx), swagger, eventBus); }
@Test public void testAlphaNumericPathParameterName() { String definition = definitions.getJsonObject(4).encode(); Swagger swagger = new SwaggerParser().parse(definition); SwaggerRouter.swaggerRouter(Router.router(vertx), swagger, eventBus); }