Skip to content

Releases: swagger-api/swagger-core

swagger-core v2.0.0-rc2 Release candidate!

29 Sep 17:43
Compare
Choose a tag to compare

The Swagger team is proud to announce the rc2 release candidate of our main java library swagger-core. This release candidate enhances rc1 support for OpenAPI 3.0’s main features. The missing features will be added in the next release candidates until the final release is available.

In order to better improve these libraries and tools, we ask that you start using them and provide us with feedback in form of issues (please use label 3.0 spec support) on the github repository. The issues are a huge help in finding what’s missing or not working properly (though note some issues are already submitted). We would also appreciate any PRs that improve existing or new tickets.

Be aware that the release notes contain the notable changes, but there may some changes that we missed in the list. The same applies for the Limitations section.

Notable Features:

  • See also rc1 release notes
  • Second official release candidate of OpenAPI 3.0 support. swagger-core now produces OpenAPI 3.0 specs only. swagger-core 2.0 version is not backward compatible with previous 1.x versions.
  • Available on Maven central, and the sources are in the 2.0 branch. PRs should be submitted against the 2.0 branch.
  • Example/Examples support (#2416)
  • New 2.0 Wiki
  • Enhanced security support (#2450)
  • Enhanced request body support (#2401)
  • Response header support (#2427)
  • Enhanced support for Parameter, Schema and Content (#2404)
  • Specification Filter (#2452)
  • Reader listener support (#2464)
  • Encoding support (#2463)
  • Consumes/Produces full support(#2404)
  • Annotation javadocs (#2394)
  • Full sample code for jersey2 and dropwizard
  • Updated dependencies
  • Changed the exposed OpenAPI defintion file name to lowercase
  • Various bug fixes

Limitations

  • Resolve resource operations also when not annotated with @Operation (swagger-jaxrs2)
  • Implement subtypes field in Schema annotation, with related resolver processing (swagger-annotations / core)
  • Overriding full support (swagger-core)
    • Schema annotation type + format full support (swagger-core)
  • Reader sub-resources support (swagger-jaxrs2)
  • Reader extensions full support (swagger-jaxrs2)
  • Integration layer enhancements:config file location enhanced loading, additional loaders, etc. (swagger-integration, swagger-jaxrs)
  • JsonIdentity support (swagger-core)
  • MatrixParam annotation support

swagger-core v2.0.0-rc1 Release candidate!

17 Aug 16:01
Compare
Choose a tag to compare

The Swagger team is proud to announce the rc1 release candidate of our main java library swagger-core. This release candidate provides official initial support for OpenAPI 3.0’s main features. The missing features will be added in the next release candidates until the final release is available.

In order to better improve these libraries and tools, we ask that you start using them and provide us with feedback in form of issues (please use label 3.0 spec support) on the github repository. The issues are a huge help in finding what’s missing or not working properly (though note some issues are already submitted). We would also appreciate any PRs that improve existing or new tickets.

Be aware that the release notes contain the notable changes, but there may some changes that we missed in the list. The same applies for the Limitations section.

Notable Features:

  • First official release candidate of OpenAPI 3.0 support. swagger-core now produces OpenAPI 3.0 specs only. swagger-core 2.0 version is not backward compatible with previous 1.x versions.
  • Available on Maven central, and the sources are in the 2.0 branch. PRs should be submitted against the 2.0 branch.
  • Swagger JAX-RS 2 support
  • Java 8
  • Consistent integration mechanism

Limitations

  • Resolve resource operations also when not annotated with @Operation (swagger-jaxrs2)
  • Implement subtypes field in Schema annotation, with related resolver processing (swagger-annotations / core)
  • Overriding full support (swagger-core)
    • Schema annotation type + format full support (swagger-core)
    • Schema annotation implementation field full support (swagger-core)
  • Filter / Reader listener support (swagger-jaxrs2)
  • Reader sub-resources support (swagger-jaxrs2)
  • Reader extensions full support (swagger-jaxrs2)
  • Annotations javadocs (swagger-annotations)
  • Annotations default values enhancement (swagger-annotations / core)
  • Integration layer enhancements:config file location enhanced loading, additional loaders, etc. (swagger-integration, swagger-jaxrs)
  • Consumes/Produces full support (swagger-jaxrs2)
  • JsonIdentity support (swagger-core)
  • MatrixParam annotation support

swagger-core v2.0.0-rc0 Release candidate!

16 Aug 16:58
Compare
Choose a tag to compare

Something went wrong with rc0, please use swagger-core v2.0.0-rc1 instead.

Swagger-core 1.5.16 released!

17 Oct 18:27
Compare
Choose a tag to compare

Minor release that upgrades a couple of dependency to deal with their respective security vulnerabilities. See #2275 for more details.

Swagger-core 1.5.15 released!

16 Jun 16:51
Compare
Choose a tag to compare

Tiny but important fix required for swagger-parser-1.0.30 (#2254)

Don't be shy to pick it up though! Tiny fixes can be important too...

Swagger Core 1.5.14 Released

13 Jun 20:53
Compare
Choose a tag to compare

Looking for OpenAPI 3.0 spec support? Jump in here:

https://github.com/swagger-api/swagger-core/tree/feature/3.0.0-rc1

v1.5.14 adds a few features and fixes a few boo-boos.

New features:

  • Updated logback to 1.2.3 #2182
  • Better XML support from namespace annotation #2246
  • Support for Jackson's @JsonSerializeAs annotation #2147
  • Updated .equals and .hashcode #2168
  • Support getter-less model scanning #2251

Fixes:

  • Null check in setRequired(...) method in ModelImpl #2167
  • Null check for empty array inner properties #2214

Swagger-core 1.5.12 Released

27 Dec 21:14
Compare
Choose a tag to compare

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 @ApiImplicitParams at class level #1926
  • Added type and format in annotations #1973, #2034, #2035
  • Easier setting of vendorExtensions #2020
  • Added readOnly, allowEmptyValue, collectionFormat fields in annotations #2054, #2055
  • Better type handling for JSON serialization of minimum, maximum
  • Added boolean enum support (as if true | false wasn't enough) #2058

Fixes:

  • Use null vs. false for default boolean value #1827
  • Security enum fixes, other embarrassing stuff #1910, #1919
  • Preserve order for maps #1934, #2022
  • No more duplicate operationId values with inheritance #1959

Swagger-Core 1.5.10 Released!

19 Aug 21:09
Compare
Choose a tag to compare

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!

16 May 18:22
Compare
Choose a tag to compare

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

  • #1717 - Fix NPE with class level api response with no ApiOperation annotation in method or no defined responses in operation
  • #1506 - JAXRS reads also parent @Api, @ApiImplicitParam and method param annotations
  • #1754 - Fixed line ending issue in Windows

Swagger-Core 1.5.8 Released!

16 Mar 17:52
Compare
Choose a tag to compare

Upgrade notes:

  • behavior changes to comma separated “produces” and “consumes” values in @ApiOperation, @Api, @Produces and @Consumes annotations; 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) /swagger and /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.ApiListingResourceJSON no 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 @Produces Annotation are ignored in Accept header (#1609)
  • @ApiResponse at 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)