Strange, what you're doing roughly follows this example: https://github.com/swagger-api/swagger-samples/tree/master/java/java-jersey-governator
Suggestion, please try making your SwaggermetadataConfig class a concrete one rather than interface. It's possible that the scanner is not picking up the annotations on the interface. On Wednesday, May 10, 2017 at 12:19:01 PM UTC-7, K Bingham wrote: > > > > > I did have a question about the behavior of the Annotations and > beanConfig. I have read the documentation over and over and followed > through the followed through the code to look at the objects. > > Basically, I followed the documentation for configuration and > initialization, and it scans on startup beautifully, but the @Info object > within @SwaggerDefinition does not flow through like expected and the > beanConfig is taking over (even if I remove the @Info attributes). > > Config interface is below followed by the bean config. Any pointers on > what I am doing wrong is very much appreciated. > > Stuck and hoping for help, > > KB > > > package example.ods.dataapi.rest; > > > import io.swagger.annotations.Api; > > import io.swagger.annotations.Contact; > > import io.swagger.annotations.Extension; > > import io.swagger.annotations.ExtensionProperty; > > import io.swagger.annotations.Info <http://io.swagger.annotations.info/>; > > import io.swagger.annotations.License; > > import io.swagger.annotations.SwaggerDefinition; > > > > @Api > > @SwaggerDefinition( > > info = @Info( > > title = "Title API Documentation", > > version = "0.3.1", > > description = "Discover the Data", > > termsOfService = "This is for public use.", > > contact = @Contact( > > name = "ODS Team", > > email = "[email protected]", > > url = "Coming Soon - http://ods.data.example"), > > license = @License( > > name = "Works", > > url = "https://www.works.example/lic > <https://www.usa.gov/government-works>" > > ), > > extensions = @Extension(properties = { > > @ExtensionProperty(name = "classificationRecord", value = > "Classification > of this swagger file - UNCLASSIFIED"), > > @ExtensionProperty(name = "classificationData", value = > "Classification > of the data API - UNCLASSIFIED"), > > @ExtensionProperty(name = "classificationOfData", value = > "Dynamic > Classification upto UNCLASSIFIED//FOUO"), > > @ExtensionProperty(name = "mission", value = "Lead, > Broker, and Differentiate."), > > @ExtensionProperty(name = "security", value = > "YetAnotherJSONPayload") > > }) > > ), > > consumes = {"application/json", "application/xml"}, > > produces = {"application/json", "application/xml"}, > > schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition > .Scheme.HTTPS} > > ) > > > public interface SwaggermetadataConfig { > > > } > -----------beanConfig---------- > > <bean id="beanConfig" class="io.swagger.jaxrs.config.BeanConfig"> > > <property name="title" value="Swagger Data API Documentation" /> > > <property name="contact" value="Dev Team" /> > > <property name="version" value="0.3" /> > > <property name="schemes" value="http" /> > > <property name="host" value="localhost:8080" /> > > <property name="basePath" value="/dataapi" /> > > <property name="resourcePackage" value="example.ods.dataapi.rest, > io.swagger.resources" /> > > <property name="scan" value="true" /> > > <property name="prettyPrint" value="true" /> > > </bean> > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
