swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

APACHE-2.0 License

Stars
7.3K
Committers
310

Bot releases are hidden (Show)

swagger-core - Swagger-core 1.5.16 released!

Published by webron almost 7 years ago

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

swagger-core - swagger-core v2.0.0-rc2 Release candidate!

Published by frantuma about 7 years ago

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 - swagger-core v2.0.0-rc1 Release candidate!

Published by frantuma about 7 years ago

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 - swagger-core v2.0.0-rc0 Release candidate!

Published by frantuma about 7 years ago

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

swagger-core - Swagger-core 1.5.15 released!

Published by fehguy over 7 years ago

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 - Swagger Core 1.5.14 Released

Published by fehguy over 7 years ago

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 - Swagger-core 1.5.12 Released

Published by fehguy almost 8 years ago

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 - Swagger-Core 1.5.10 Released!

Published by frantuma about 8 years ago

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 - Swagger-Core 1.5.9 Released!

Published by webron over 8 years ago

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 - Swagger-Core 1.5.8 Released!

Published by webron over 8 years ago

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)
swagger-core - Swagger-Core 1.5.7 Released!

Published by fehguy over 8 years ago

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-jaxrs module. 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 the JacksonJsonProvider in the io.swagger.jaxrs.json package, 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 @Api and @Path parameters. The commit https://github.com/swagger-api/swagger-core/commit/8921f2f566aa8a1fd3917610fd3c0802017bed2a 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 - Swagger-Core 1.5.6 Released!

Published by fehguy almost 9 years ago

This release includes a minor fix to address a bug with defaultValues (#1568)

swagger-core - Swagger-Core 1.5.5 Released!

Published by fehguy almost 9 years ago

This release includes minor fixes to models and example value support.

Notable features

  • Support for primitive models (#1560)
  • Added byte, binary properties (#1578)
  • Added vendor extension to top level swagger (#1523)

Notable bug fixes

  • Fixed issue for implcit params (#1319)
swagger-core - Swagger-Core 1.5.4 Released!

Published by fehguy almost 9 years ago

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.LocalDate and java.time.LocalDateTime (#1475)
  • Parse support for java.util.Optional (#1479)
  • Improved parsing of composed models (#1373)
  • Shared responses model 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 nickname if specified for operationId on operations (#1440)
  • Parse bug for @Consumes and @Produces at api root (#1448)
  • Deserialization loses description (#1462)
  • Added description field in security definitions (#1463)
  • Fixed property parsing for MIN_ITEMS and MAX_ITEMS (#1477)
  • Better enum support for non-string types (#1418)
swagger-core - Swagger-core 1.5.3 Released!

Published by fehguy about 9 years ago

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

  • Fixed StringProperty.equals() #1331
  • Fixed scanning of non JAX-RS resources #1343
swagger-core - Swagger-core 1.5.1 Released!

Published by webron about 9 years ago

First service release for the 1.5 branch.

Notable features

  • Tags are now removed if all their operations are filtered out - #977
  • (BREAKING CHANGE) Default collectionFormat for query and form parameters is now multi - #1160
  • Added @ApiParam#hidden() to hide parameters - #1188
  • Changed scanning order of @SwaggerDefinition - #1243
  • Added range support for @ApiModelProperty#allowableValues() - #1276
  • Added support for relative references - #1229

Notable bug fixes

  • Fixed NPE in some filtering cases - #1141
  • Fixed inclusion of XML structure - #1143, #1292
  • Fixed funky behavior when adding a body @ApiImplictParameter - #1150
  • Fixed parsing of paths with regex expressions - #1153
  • Fixed representation of BigDecimal and BigInteger - #1154
  • Fixed model property edge case - #1155
  • Fixed processing of unwanted body parameters - #1176, #1191
  • Fixed Swagger definition generation for self-referencing models - #1178
  • Processing of @Deprecated now works - #1183, #1212
  • Fixed definition generation when FormDataBodyPart is used in Jersey - #1187
  • Proper handling of root paths - #1189
  • Fixed subresource scanning - #1215
  • Fixed support for BeanConfig in the Mule module - #1234
  • Corrected MANIFEST entries for OSGi support - #1285

Notable changes

  • Initial migration of tests from scala to Java based on TestNG
swagger-core - Swagger-core 1.5.2 Released!

Published by webron about 9 years ago

Maintenance release.

Revert breaking change introduced by https://github.com/swagger-api/swagger-core/pull/1297.

swagger-core - Swagger-core 1.5.0 Released!

Published by webron over 9 years ago

This is the first formal release of swagger-core with 2.0 spec support. Many thanks to the community for furthering the development of swagger.

Please note! We have repackaged the project from com.wordnik to io.swagger. The code API is the same!

Major changes

  • Better generics support - #498, #1096
  • No-annotations support - #978
  • Support for bean validation (JSR303) - #800
  • Improved composition support - #802, #852
  • Support for remote references - #864
  • More samples migrated to 1.5 and moved to a new repository at swagger-samples - #898,
  • Added parsing of @Api/@ApiOperation#protocols() - #953
  • Improved container support - #954, #955, #1032, #976
  • Improved annotation inheritance support - #1072
  • Added support for constructor parameter declarations - #1085
  • Introduced a new annotation-based configuration method

Bug fixes

  • Subresource integration fixes - #394, #942
  • Fixed support for ranges in allowableValues - #892, #957
  • Support for @ApiImplicitParam - #905
  • Request body not being picked up - #943
  • NPE when configuring swagger-core - #951
  • Fixed processing of @Api/@ApiOperation#produces()/consumes() - #952
  • Enum support - #1019, #1004
  • File upload support for Jersey2 - #1015
  • Recursive packages scanning - #1011
  • Examples are now objects - #988
  • Fixed authorization inheritance - #1041
  • Fixed primitive support for responses - #1120
swagger-core - Swagger-core 1.5.0-M2 Released!

Published by fehguy over 9 years ago

Swagger core has undergone a major update to increase support of the Swagger 2.0 specification. Major features include support for JAXRS sub resources and Bean Validations.

Usage notes

1.5.0-M2 is API compatible with M1. It has improved stability as well as configuration options.

Major changes

Scala support has been moved to a separate project so it can evolve independently. Play! framework support will also be treated the same way.

If you need Play! support, please use swagger-core-1.3.12 until the play module is released.

Notable features
#942, #925 subresource support
#936 support for example objects
#922 better support for jaxrs regex path params
#897 support for schemes, other 2.0 support in BeanConfig
#879 multiple packages can be scanned as CSV list
#878, #841 added support for tags in operations, bootstrap
#876 glassfish PATCH annotation support
#869 response headers supported
#854 read-only fields supported
#844 JAXB default value support
#836 spec filter support
#833 model converter support
#801 BeanValidations support for JSR-303, JSR-349
#519 @JsonIgnoreProperties support
#505 @XmlElementWrapper support

Notable bug fixes
#906 http methods detected case insensitive
#886 Java 8 compilation supported

swagger-core - Swagger-core v1.5.2-M1 Released!

Published by fehguy over 9 years ago

Minor release to support the following:

  • Supporting tags in operations #878
  • Return proper response type for Response.Status #877
Package Rankings
Top 1.34% on Repo1.maven.org
Top 3.63% on Proxy.golang.org
Badges
Extracted from project README's
Maven Central