Releases: swagger-api/swagger-core
Swagger-core 1.5.12 Released
Happy Holidays!!! Here's a gift from the Swagger Team.
We've updated Jackson to 2.8.4 in 1.5.12! This brings better performance, security, and bigger numbers to swagger-core.
This release replaces swagger-core-1.5.11, which was released with an issue affecting swagger parser.
As with always, there are many good things in this version
Enhancements:
- Added java.time.OffsetDateTime #1759
- Added minItems,maxItems for array properties #1767, #1781
- Better support for model resolvers when no setters #1768, #1839
- Scanning of split resources, interfaces #1800, #1888
- Jackson unwrapped support #1833
- Better support for child models #1896
- More annotation support for validations #1905
- Added
multipleOf#1907 - Support for
@ApiImplicitParamsat class level #1926 - Added
typeandformatin annotations #1973, #2034, #2035 - Easier setting of
vendorExtensions #2020 - Added
readOnly,allowEmptyValue,collectionFormatfields in annotations #2054, #2055 - Better type handling for JSON serialization of
minimum,maximum - Added
booleanenum support (as iftrue|falsewasn't enough) #2058
Fixes:
Swagger-Core 1.5.10 Released!
Notable changes
- #1656 - Multiple swagger definitions using the base path as a unique context discriminator
(see also specific sample java-jersey-jaxrs-multi-use-basepath)
- #1513 - Method level reader extensions
(see example for decorator and annotated resource)
Notable bug fixes
- #1714 - Fix swagger definition path for jersey2; deprecates ApiListingResourceJSON
- #1831 - Fix ConcurrentModificationException when using SwaggerSpecFilter
- #1765 - Fix numeric enum values serialization
- #1648 - Fix IllegalArgumentException with @BeanParam and extra methods
- #1757 - Retain refs from Array/Map Property types and ComposedModel when using "removingUnreferencedDefinitions"
- #1776 - OSGi friendly swagger-jersey2-jaxrs
Swagger-Core 1.5.9 Released!
Upgrade notes
1.5.8 introduced a change of behavior to the resource scanning which ended up reading unintended resources. This change was reverted to the way it was before, only with a cleaner scanning of sub resources. The table below describes what will be scanned and what will be skipped:
| Annotations | Result |
|---|---|
@Api |
skip |
@Path |
skip |
| scanAllResources | skip |
@Api (hidden=true) |
skip |
@Api (hidden=true) @Path |
skip |
@Api (hidden=true) scanAllResources |
skip |
@Api scanAllResources |
skip |
@Api @Path |
parse |
@Path scanAllResources |
parse |
| subresource | parse |
@Api subresource |
parse |
The wiki has been updated with the details.
Notable changes
- #1756 - Added support for Java 8's java.time.Instant
- #1715 - Consider java.time.ZonedDateTime a Swagger DateTime primitive
Notable bug fixes
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)
Swagger-Core 1.5.7 Released!
This release provides new functionality for lower-level integration with Swagger and resolves compatibility issues in some deployments where @Provider scanning is not configurable.
Upgrade notes:
- Previously, a JacksonJsonProvider class was bundled in the
swagger-jaxrsmodule. This made configuration of the JSON mapper easy and consistent with what is provided for rendering the swagger json/yaml definitions. Because some deployments need a different mapper configuration, this was causing problems and was removed. If you were relying on theJacksonJsonProviderin theio.swagger.jaxrs.jsonpackage, please either copy the logic of this file from the 1.5.6 tag or create your own provider! - Scanning subresources was inconsistent and didn't always follow the expected patter for
@Apiand@Pathparameters. The commit 8921f2f fixes this, but may create issues for those taking advantage of those "bugs". If you are using subresources, please verify that it's behaving how you like after upgrading to 1.5.7.
Notable features
- Removed Jackson Provider (#1604)
- Multiple swagger definitions supported in a single JVM instance (#1600, #1482, #1636)
- Added vendor extensions to Composed Model (#1596)
- Host, port, basePath configurations added to web.xml, BeanConfig
- Bean Validation added for parameters (#1438)
- Subresource scanning has been improved (#1106, #1614, #1617)
- Filtering of unreferenced definitions when configured in SpecFilter (#1557)
Notable bug fixes
- SimpleRef has been exposed in RefResponse (#1616)
Swagger-Core 1.5.6 Released!
This release includes a minor fix to address a bug with defaultValues (#1568)
Swagger-Core 1.5.5 Released!
Swagger-Core 1.5.4 Released!
This release includes major functionality improvements in swagger-core, including migration of the swagger-servlet project for annotating non JAX-RS-based projects to support swagger.
Please note that we have moved support for the Play! framework into a separate project
As with all swagger OSS projects, we couldn’t have made so much progress without support from the community. A special thanks to @webron, @lugaru1234, @iushankin, @tomtit and @elakito for all your efforts!
Notable features
- Added support for shared parameters in the root of the swagger definition (#1317)
- Added better support for scanning generic models (#1344)
- New models to represent references in parameters, responses (#1388)
- Updated OSGi exports for swagger-jars (#1412)
- Vendor extensions added to all models where allowed by the swagger spec (#1416, #1414)
- Support for plain servlets via swagger-servlet (#919)
- Moved all tests to use testng framework (#1434)
- Added support for
java.validation.Pattern(#1439) - Support for processing annotations on interfaces (#1454)
- Parse support for java8
java.time.LocalDateandjava.time.LocalDateTime(#1475) - Parse support for
java.util.Optional(#1479) - Improved parsing of composed models (#1373)
- Shared
responsesmodel definitions in root swagger object (#1489) - Example payload support for all parameters added, now adds mime-specific support (#1500)
Notable bug fixes
- support relative refs starting with
/(1393 - Proper support for form data under jersey 2 (#1387)
- Recursive resource scanning fix (#1424)
- Use
nicknameif specified foroperationIdon operations (#1440) - Parse bug for
@Consumesand@Producesat api root (#1448) - Deserialization loses
description(#1462) - Added
descriptionfield in security definitions (#1463) - Fixed property parsing for MIN_ITEMS and MAX_ITEMS (#1477)
- Better
enumsupport for non-string types (#1418)
Swagger-core 1.5.3 Released!
This release introduces important support for references throughout the swagger object, as well as a shift in development workflow of the swagger project. Please see here for details of that change.
Notable features
- Updated Jackson version to 2.4.6, Guava to 18
- Improved reference support refs in a more general fashion, included relative ref support #1271
- Added vendor extensions to Model, Property interfaces #1350
- Added children to ObjectProperty. This allows for nested schema support #1314
- Migration of more tests from scala to Java #1332, #1337, #1345, #1348
Notable bug fixes
Swagger-core 1.5.2 Released!
Maintenance release.
Revert breaking change introduced by #1297.