Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Remove swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
jplock committed Dec 2, 2017
1 parent f121aff commit 325f48f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 53 deletions.
11 changes: 0 additions & 11 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ aws:
queueUrl: https://sqs.us-east-1.amazonaws.com/860114833029/smoketurner-queue
region: us-east-1

# Swagger-specific options.
swagger:

resourcePackage: com.smoketurner.pipeline.application.resources
title: Pipeline API
version: v1
description: Pipeline service API
contact: jplock@smoketurner.com
license: Apache 2.0
licenseUrl: https://www.apache.org/licenses/LICENSE-2.0

# HTTP-specific options.
server:

Expand Down
5 changes: 0 additions & 5 deletions pipeline-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sqs</artifactId>
</dependency>
<dependency>
<groupId>com.smoketurner</groupId>
<artifactId>dropwizard-swagger</artifactId>
<version>1.1.0-1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import io.dropwizard.jetty.BiDiGzipHandler;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.federecio.dropwizard.swagger.SwaggerBundle;
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;

public class PipelineApplication extends Application<PipelineConfiguration> {

Expand All @@ -61,14 +59,6 @@ public void initialize(Bootstrap<PipelineConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(
bootstrap.getConfigurationSourceProvider(),
new EnvironmentVariableSubstitutor(false)));

bootstrap.addBundle(new SwaggerBundle<PipelineConfiguration>() {
@Override
protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(
final PipelineConfiguration configuration) {
return configuration.getSwagger();
}
});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,15 @@
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;

public class PipelineConfiguration extends Configuration {

@Valid
@NotNull
private final AwsConfiguration aws = new AwsConfiguration();

@Valid
@NotNull
private final SwaggerBundleConfiguration swagger = new SwaggerBundleConfiguration();

@JsonProperty
public AwsConfiguration getAws() {
return aws;
}

@JsonProperty
public SwaggerBundleConfiguration getSwagger() {
return swagger;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
import com.google.common.base.Strings;
import com.smoketurner.pipeline.application.core.InstrumentedSseBroadcaster;
import io.dropwizard.util.Duration;
import io.swagger.annotations.Api;

@Singleton
@Path("/v1/events")
@Api(value = "events")
public class EventResource {

private static final Logger LOGGER = LoggerFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,12 @@
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import io.dropwizard.jersey.caching.CacheControl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

@Path("/ping")
@Api("ping")
public class PingResource {

@GET
@CacheControl(mustRevalidate = true, noCache = true, noStore = true)
@ApiOperation(value = "Ping", notes = "Pings the API service")
@ApiResponses(value = { @ApiResponse(code = 200, message = "pong") })
public Response ping() {
return Response.ok("pong").type(MediaType.TEXT_PLAIN).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@
import javax.ws.rs.core.Response;
import com.google.common.annotations.VisibleForTesting;
import io.dropwizard.jersey.caching.CacheControl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

@Path("/version")
@Api("version")
public class VersionResource {

private final String version;
Expand All @@ -54,9 +49,6 @@ public VersionResource(@Nonnull final String version) {

@GET
@CacheControl(mustRevalidate = true, noCache = true, noStore = true)
@ApiOperation(value = "Get Version", notes = "Returns the service version")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Service Version") })
public Response getVersion() {
return Response.ok(version).type(MediaType.TEXT_PLAIN).build();
}
Expand Down

0 comments on commit 325f48f

Please sign in to comment.