use of com.google.api.server.spi.swagger.SwaggerGenerator.SwaggerContext in project endpoints-java by cloudendpoints.
the class SwaggerGeneratorTest method testWriteSwagger_AbsolutePathEndpoint.
@Test
public void testWriteSwagger_AbsolutePathEndpoint() throws Exception {
Swagger swagger = getSwagger(AbsolutePathEndpoint.class, new SwaggerContext(), true);
Swagger expected = readExpectedAsSwagger("absolute_path_endpoint.swagger");
compareSwagger(expected, swagger);
}
use of com.google.api.server.spi.swagger.SwaggerGenerator.SwaggerContext in project endpoints-java by cloudendpoints.
the class SwaggerGeneratorTest method testWriteSwagger_EnumEndpoint.
@Test
public void testWriteSwagger_EnumEndpoint() throws Exception {
Swagger swagger = getSwagger(EnumEndpoint.class, new SwaggerContext(), true);
Swagger expected = readExpectedAsSwagger("enum_endpoint.swagger");
compareSwagger(expected, swagger);
}
use of com.google.api.server.spi.swagger.SwaggerGenerator.SwaggerContext in project endpoints-java by cloudendpoints.
the class SwaggerGeneratorTest method testWriteSwagger_FooEndpointDefaultContext.
@Test
public void testWriteSwagger_FooEndpointDefaultContext() throws Exception {
ApiConfig config = configLoader.loadConfiguration(ServiceContext.create(), FooEndpoint.class);
Swagger swagger = generator.writeSwagger(ImmutableList.of(config), false, new SwaggerContext());
Swagger expected = readExpectedAsSwagger("foo_endpoint_default_context.swagger");
compareSwagger(expected, swagger);
}
Aggregations