Swagger-Core 1.5.8 Released!
Upgrade notes:
- behavior changes to comma separated “produces” and “consumes” values in
@ApiOperation,@Api,@Producesand@Consumesannotations; previously these values would be treated as single consume/produce e.g.
@Produces(“text/xml,text/html”)in previous version would result in:
"consumes": [
"text/xml,text/html"
]With current behavior it will generate:
"consumes": [
"text/xml",
"text/html"
],- (BREAKING CHANGE)
/swaggerand/swagger.{type:json|yaml}JAX-RS endpoints provided by two separate resources, and
io.swagger.jaxrs.listing.ApiListingResource provides only /swagger.{type:json|yaml} endpoint and no longer both /swagger (with Accept header application/json or application/yaml) and /swagger.{type:json|yaml}
/swagger endpoint is provided by io.swagger.jaxrs.listing.AcceptHeaderApiListingResource
If package scanning for providers is used, behavior remains the same (AcceptHeaderApiListingResource is in the same package and gets scanned), otherwise AcceptHeaderApiListingResource must be added to scanned classes.
see also wiki
- (BREAKING CHANGE) Jersey2
io.swagger.jersey.listing.ApiListingResourceJSONno longer provides/swagger.{type:json|yaml}endpoint
Related to JAX-RS endpoints change above,
usage of Jersey2 io.swagger.jersey.listing.ApiListingResourceJSON should be replaced by
io.swagger.jaxrs.listing.ApiListingResource (or package scanning io.swagger.jaxrs.listing);
ApiListingResourceJSON no longer provides /swagger and /swagger.{type:json|yaml}; it provides only / endpoint.
Notable features
- Allow user created
@PATCH,@GET...etc annotations (#1643) - Charset of
@ProducesAnnotation are ignored in Accept header (#1609) @ApiResponseat class level (#1382)
Notable bug fixes
- NPE filtering not used definitions (#1707)
- RESTEasy unable to find contextual data of type (#1691)
- Correct consumes/produces annotation parsing (#1546)
- nickname not parsed for path in swagger-servlet (#1546)
- NPE in environments with no provides servletConfig (#1103)
- Add 'title' attribute during deserialization of non-primitive properties (#1599)
- Property example serialization (#1681)
- Fixes ignored swagger config via context attribute (#1687)