File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
samples/java-dropwizard/src/main/java/com/wordnik/swagger/sample Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11package com .wordnik .swagger .sample ;
22
33import com .wordnik .swagger .sample .resource .*;
4-
54import com .wordnik .swagger .jaxrs .config .*;
65import com .wordnik .swagger .jaxrs .listing .ApiListingResource ;
76import com .wordnik .swagger .config .*;
87
8+ import com .fasterxml .jackson .annotation .JsonInclude ;
9+
910import io .dropwizard .Application ;
1011import io .dropwizard .setup .Bootstrap ;
1112import io .dropwizard .setup .Environment ;
@@ -27,9 +28,12 @@ public String getName() {
2728 public void run (SwaggerSampleConfiguration configuration , Environment environment ) {
2829 environment .jersey ().register (new ApiListingResource ());
2930 environment .jersey ().register (new PetResource ());
31+ environment .getObjectMapper ().setSerializationInclusion (JsonInclude .Include .NON_NULL );
3032
31- // SwaggerConfig config = ConfigFactory.config();
32- // config.setApiVersion("1.0.1");
33- // config.setBasePath("http://localhost:8000");
33+ BeanConfig config = new BeanConfig ();
34+ config .setTitle ("Swagger sample app" );
35+ config .setVersion ("1.0.0" );
36+ config .setResourcePackage ("com.wordnik.swagger.sample" );
37+ config .setScan (true );
3438 }
3539}
You can’t perform that action at this time.
0 commit comments