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

Overview

Swagger Core

NOTE: If you're looking for Swagger Core 1.5.X and OpenAPI 2.0, please refer to 1.5 branch.

NOTE: Since version 2.1.7 Swagger Core supports also Jakarta namespace, with a parallel set of artifacts with -jakarta suffix, providing the same functionality as the "standard" javax namespace ones. Please check Wiki for more details

Build Test Deploy Maven Central

Swagger Core is a Java implementation of the OpenAPI Specification. Current version supports JAX-RS2 (javax and jakarta namespaces).

Get started with Swagger Core!

See the guide on getting started with Swagger Core to get started with adding Swagger to your API.

See the Wiki!

The github wiki contains documentation, samples, contributions, etc. Start there.

Compatibility

The OpenAPI Specification has undergone several revisions since initial creation in 2010. The Swagger Core project has the following compatibilities with the OpenAPI Specification:

Swagger core Version Release Date OpenAPI Spec compatibility Notes Status
2.1.7 (current stable) 2021-02-18 3.0 tag v2.1.7 Supported
2.1.6 2020-12-04 3.0 tag v2.1.6 Supported
2.1.5 2020-10-01 3.0 tag v2.1.5 Supported
2.1.4 2020-07-24 3.0 tag v2.1.4 Supported
2.1.3 2020-06-27 3.0 tag v2.1.3 Supported
2.1.2 2020-04-01 3.0 tag v2.1.2 Supported
2.1.1 2020-01-02 3.0 tag v2.1.1 Supported
2.1.0 2019-11-16 3.0 tag v2.1.0 Supported
2.0.10 2019-10-11 3.0 tag v2.0.10 Supported
2.0.9 2019-08-22 3.0 tag v2.0.9 Supported
2.0.8 2019-04-24 3.0 tag v2.0.8 Supported
2.0.7 2019-02-18 3.0 tag v2.0.7 Supported
2.0.6 2018-11-27 3.0 tag v2.0.6 Supported
2.0.5 2018-09-19 3.0 tag v2.0.5 Supported
2.0.4 2018-09-05 3.0 tag v2.0.4 Supported
2.0.3 2018-08-09 3.0 tag v2.0.3 Supported
1.6.2 (current stable) 2020-07-01 2.0 tag v1.6.2 Supported
1.6.1 2020-04-01 2.0 tag v1.6.1 Supported
1.6.0 2019-11-16 2.0 tag v1.6.0 Supported
1.5.24 2019-10-11 2.0 tag v1.5.24 Supported
1.5.23 2019-08-22 2.0 tag v1.5.23 Supported
1.5.22 2019-02-18 2.0 tag v1.5.22 Supported
1.5.21 2018-08-09 2.0 tag v1.5.21 Supported
1.5.20 2018-05-23 2.0 tag v1.5.20 Supported
2.0.2 2018-05-23 3.0 tag v2.0.2 Supported
2.0.1 2018-04-16 3.0 tag v2.0.1 Supported
1.5.19 2018-04-16 2.0 tag v1.5.19 Supported
2.0.0 2018-03-20 3.0 tag v2.0.0 Supported
2.0.0-rc4 2018-01-22 3.0 tag v2.0.0-rc4 Supported
2.0.0-rc3 2017-11-21 3.0 tag v2.0.0-rc3 Supported
2.0.0-rc2 2017-09-29 3.0 tag v2.0.0-rc2 Supported
2.0.0-rc1 2017-08-17 3.0 tag v2.0.0-rc1 Supported
1.5.18 2018-01-22 2.0 tag v1.5.18 Supported
1.5.17 2017-11-21 2.0 tag v1.5.17 Supported
1.5.16 2017-07-15 2.0 tag v1.5.16 Supported
1.3.12 2014-12-23 1.2 tag v1.3.12 Supported
1.2.4 2013-06-19 1.1 tag swagger-project_2.10.0-1.2.4 Deprecated
1.0.0 2011-10-16 1.0 tag v1.0 Deprecated

Change History

If you're interested in the change history of swagger and the Swagger Core framework, see here.

Prerequisites

You need the following installed and available in your $PATH:

  • Java 8
  • Apache maven 3.0.4 or greater
  • Jackson 2.4.5 or greater

To build from source (currently 2.1.8-SNAPSHOT)

# first time building locally
mvn -N

Subsequent builds:

mvn install

This will build the modules.

Of course if you don't want to build locally you can grab artifacts from maven central:

https://repo1.maven.org/maven2/io/swagger/core/

Sample Apps

The samples have moved to a new repository and contain various integrations and configurations.

Security contact

Please disclose any security-related issues or vulnerabilities by emailing [email protected], instead of using the public issue tracker.

Comments
  • Add support for JAX-RS @BeanParam

    Add support for JAX-RS @BeanParam

    Would it be possible to add support for the @BeanParam (https://jax-rs-spec.java.net/nonav/2.0/apidocs/javax/ws/rs/BeanParam.html) from JAX-RS? Same question as answered at http://stackoverflow.com/questions/19913046/does-swagger-support-the-jax-rs-beanparam-annotation, but didn't find an issue for it here.

    Feature 
    opened by joscarsson 58
  • 1.5.x: ApiImplicitParams annotation is ignored

    1.5.x: ApiImplicitParams annotation is ignored

    When I first noticed this bug I thought it happens only when I use ApiParam and ApiImplicitParams at the same time.

    Looks like ApiImplicitParams is ignored in any case. As result I can't document security token which intercepted by servlet filter earlier.

    Here is endpoint

    @GET
    @Consumes("text/plain")
    @Produces(MediaType.APPLICATION_JSON)
    @Path("testParams")
    @ApiOperation(response = String.class, value = "Returns string with provided parameter")
    @ApiImplicitParams({@ApiImplicitParam(name = "token", required = true, dataType = "string", paramType = "query", value = "API token")})
    public String testParams(@ApiParam(required = false, value = "ID of timesheet") @QueryParam("id") int id) {}
    

    Example project is located at https://github.com/cppexpert/broken_swagger_jaxrs_integration

    Bug P1 
    opened by unoexperto 52
  • Resources not listed : Jersey 2.5 + Swagger on Websphere 7

    Resources not listed : Jersey 2.5 + Swagger on Websphere 7

    Hi

    I have successfully configured Swagger with our Jax-rs/Jersey 2 application. Works fine with maven jetty plugin and on Tomcat test server

    However, when deploying to Websphere 7, no resources are listed. The /api-docs resources returns

    {"apiVersion":"1.0","swaggerVersion":"1.2"}
    

    My BeanConfig looks like this

     BeanConfig beanConfig = new BeanConfig();
     beanConfig.setVersion(apiVersion);
     beanConfig.setResourcePackage(resourcePackage);
     beanConfig.setBasePath(basePath);
     beanConfig.setDescription("EK resources");
     beanConfig.setTitle("EK API");
     beanConfig.setScan(true);
    

    (apiVersion, resourcePackage and basePath are defined in a properties file and injected by Spring)

    Not sure how to get past this. We would like to have our APIs documented when running in our production and qa environments

    Dependency in pom.xml

    <groupId>com.wordnik</groupId>
    <artifactId>swagger-jersey2-jaxrs_2.10</artifactId>
    <version>1.3.12</version>
    
    P3 
    opened by engrun 49
  • ApiModelProperty doesn't support example for arrays / Lists

    ApiModelProperty doesn't support example for arrays / Lists

    By default array or List of integers is generated in UI with example:

    "eventTypes": [0],
    

    I've tried to add "example" property, but that:

    @ApiModelProperty(required = true, example = "[2, 3]")
    private int[] lorem;
    

    generates example values as string:

    "eventTypes": "[2, 3]",
    

    Other options like "2, 3" don't work neither. In result to have valid json in example it has to have only one value, zero.

    opened by m-radzikowski 48
  • JAXB Annotations Ignored (Default ObjectMapper behavior) for Definitions

    JAXB Annotations Ignored (Default ObjectMapper behavior) for Definitions

    To replicate this issue, use a data model similar to this one:

    https://gist.github.com/TomDataworks/56e2b6e259fd1b971aa8

    The XmlAccessType.NONE configuration requires explicit declaration of all JAXB Elements, and behaves as expected when using a JacksonJaxbJsonProvider in Apache CXF. However, when exposing the API listing via Swagger, the definitions match exactly what the JacksonJsonProvider or a standard ObjectMapper would produce.

    The element marked @XmlElement(name="body") does not appear in the definition of Message. While @XmlAccessorType(XmlAccessType.NONE) is specified, any elements that are explicitly defined should appear.

    There are a number of ObjectMappers in the Swagger codebase, and I am trying to track down which one is responsible for this particular task (generating the definitions).

    Documentation 
    opened by TomDataworks 44
  • Missing dependency `WebConfig` or `ServletConfig` with Jersey+Grizzly2+Swagger?

    Missing dependency `WebConfig` or `ServletConfig` with Jersey+Grizzly2+Swagger?

    I have a very straightforward use-case, following the Swagger JAX-RS example and anything I could find in 48 hours of Googling.

    Here's the embedded Grizzly2 server:

    URI baseUri = UriBuilder.fromUri("http://0.0.0.0/").port(port).build();
    ResourceConfig masterApplication = new MasterApplication(); // This extends PackagesResourceConfig
    webServer = GrizzlyServerFactory.createHttpServer(baseUri, masterApplication);
    

    Here's the Swagger ApiListing:

    import com.wordnik.swagger.jersey.listing.ApiListing;
    
    @Path("/resources.json")
    @Api("/resources")
    @Produces(MediaType.APPLICATION_JSON)
    public class MyriaApiListing extends ApiListing {
    }
    

    And here's the missing dependency error:

    Jun 20, 2013 3:09:54 PM com.sun.jersey.spi.inject.Errors processErrorMessages
    SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
      SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.wordnik.swagger.jersey.listing.ApiListing.apiListing(java.lang.String,javax.ws.rs.core.Application,com.sun.jersey.spi.container.servlet.WebConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo) at parameter at index 2
      SEVERE: Method, public javax.ws.rs.core.Response com.wordnik.swagger.jersey.listing.ApiListing.apiListing(java.lang.String,javax.ws.rs.core.Application,com.sun.jersey.spi.container.servlet.WebConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), annotated with GET of resource, class com.wordnik.swagger.jersey.listing.ApiListing, is not recognized as valid resource method.
      SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.wordnik.swagger.jersey.listing.ApiListing.resourceListing(javax.ws.rs.core.Application,com.sun.jersey.spi.container.servlet.WebConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo) at parameter at index 1
      SEVERE: Method, public javax.ws.rs.core.Response com.wordnik.swagger.jersey.listing.ApiListing.resourceListing(javax.ws.rs.core.Application,com.sun.jersey.spi.container.servlet.WebConfig,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), annotated with GET of resource, class com.wordnik.swagger.jersey.listing.ApiListing, is not recognized as valid resource method.
    Exception in thread "main" com.sun.jersey.spi.inject.Errors$ErrorMessagesException
        at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)
        at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136)
        at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:770)
        at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:172)
        at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:134)
        at com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory.createHttpServer(GrizzlyServerFactory.java:242)
        at edu.washington.escience.myriad.api.MasterApiServer.<init>(MasterApiServer.java:43)
        at edu.washington.escience.myriad.daemon.MasterDaemon.<init>(MasterDaemon.java:48)
        at edu.washington.escience.myriad.daemon.MasterDaemon.main(MasterDaemon.java:30)
    

    I've tried this with swagger-jaxrs and swagger-jersey-jaxrs, and that just makes the error message flip between ServletConfig and WebConfig.

    Various issues on GitHub (#146, #136, #64) appear to reference this problem or problems like it, and seem to be merged with the code base, but I still have the issue.

    Any advice?

    Thanks! Dan

    opened by dhalperi 42
  • Allow to use of multiple Swagger configurations per single ServletConfig using base path as descriminator

    Allow to use of multiple Swagger configurations per single ServletConfig using base path as descriminator

    Hey guys,

    Please take a look on this enhancement which allows to use multiple Swagger configurations per single servlet (more precisely, ServletConfig). Essentially, this is more generic approach than the one taken by https://github.com/swagger-api/swagger-core/issues/1482 and is using the base path as a unique context discriminator. The original discussion has been started here https://groups.google.com/forum/#!topic/swagger-swaggersocket/bf7uVBWYRTw and the solution suggested by @frantuma has been implemented.

    There are two configuration parameters available:

    • Servlet init parameter 'swagger.use.path.based.config' = true | false
    • usePathBasedConfig property of BeanConfig

    When those properties are set, the SwaggerContextService is going to use base path to uniquely identify the API Swagger's configuration components: context, config and scanner. This is very important in multiple use cases, for example when many independent APIs are deployed using single servlet (the best exampe could be OSGi container).

    This approach works quite well for deploying multiple Swagger configs in the same JVM and even within same servlet. As the further suggestion, we could simplify SwaggerContextService a lot by removing SCANNER_ID_KEY, CONTEXT_ID_KEY and CONFIG_ID_KEY and rely solely on path-based configuration (less boilerplate to the users with the same goals being achieved).

    What do you think guys? Thanks a lot.

    PS: The original issue was posted to Apache CXF JIRA is https://issues.apache.org/jira/browse/CXF-6740

    Best Regards, Andriy Redko & Aki Yoshida

    opened by reta 40
  • Mongo ObjectId mapping issue in swagger mapper

    Mongo ObjectId mapping issue in swagger mapper

    Hi, Swagger is not able to map Mongo ObjectId correctly. My model class looks something like this:

    public class Person implements Serializable { @org.jongo.marshall.jackson.oid.Id @ObjectId private String id; // internal mongo db id ...

    Swagger gives me response something like this:

      "_id": {
        "date": 1343026573000,
        "time": 1343026573000,
        "timestamp": 1343026573,
        "new": false,
        "timeSecond": 1343026573,
        "inc": 402653369,
        "machine": 808430687
      }
    

    Instead I expect something like this: "_id": "406b5b3de4b8dde5f3000000"

    I have seen already existing issues and tried following things but nothing seems to work.

    1. Using @ApiModelProperty(dataType= "string") annotation of my id field but it's not working.
    2. I tried using Overriding model in my bootstrap servlet but no help.

    import com.wordnik.swagger.converter.*;

    String jsonString = "{" + " "_id" : "ObjectId" "+ "}"; OverrideConverter converter = new OverrideConverter(); converter.add(ObjectId.class.getName(), jsonString); ModelConverters.addConverter(converter, true);

    But it's not working, may be I'm doing it wrong way.

    1. I also tried using Typeconverter but didn't solve the issue:

        ```
        TypeConverter typeConverter = new TypeConverter();
        typeConverter.add("_id", "string");
        ModelConverters.addConverter(typeConverter, true);
        ```
      

    Anyone who has faced the same issue and able to find any work around for this, please revert.

    Thanks

    opened by mukulgupta2507 39
  • Override queryparam datatype

    Override queryparam datatype

    on ui it shows the queryparam datatype as CsvIntegerParameter instead of string. By overriding the model with converter, it doesn't seem to help in case of query param for deserialization.

    If I compare to the joda datetime, it seems to be able to show it as "string". Any idea how I can achieve similarly for a custom datatype object for a query param.

    I'm looking for a way where I can this below type: to be "string"

    {
    name: "testInts",
    description: "test ints",
    required: false,
    type: "CsvIntegerParameter",
    paramType: "query",
    allowMultiple: false
    },
    

    from my bean param:

    @ApiModelProperty(value = "test ints", dataType = "string")
        @ApiParam(value = "test ints")
        @QueryParam("testInts")
        @JsonProperty("testInts")
        private CsvIntegerParameter testInts;
    

    In post body of Model schema, it shows correctly as expected

    Here's how I had done override String jsonString = "{" + " "id": "CsvIntegerParameter"," + " "properties": {" + " "values": {" + " "required": false," + " "description": "comma separated ints"," + " "notes": "Add any notes you like here"," + " "type": "string"," + " "format": "int32"" + " }" + " }" + "}"; OverrideConverter converter = new OverrideConverter(); converter.add("reporting.model.CsvIntegerParameter", jsonString);

    Bug Awaiting Feedback 
    opened by swarupe04 35
  • Issue with generics model and return type

    Issue with generics model and return type

    The reflection can't find proper generic model property.

    public class ResultList<T> {
        private List<T> results;
        public List<T> getResults() {
            return results;
        }
        public void setResults(List<T> results) {
            this.results = results;
        }
    }
    class UserResultList extends ResultList<User> {
    }
    

    The reflection can find the ResultList results property, but it shows as an array of objects. To work around, I have to override the methods:

    class OfferResultList extends ResultList<Offer> {
        @Override
        public List<Offer> getResults() {
            return super.getResults();
        }
        @Override
        public void setResults(List<Offer> results) {
            super.setResults(results);
        }
    }
    

    The issue also exists in the method return types. I looked at the code and seems it's not trivial to make a fix. All reflection functions are expecting a Class[_] rather than Type.

    Bug P2 
    opened by shuz 34
  • Migrate play module

    Migrate play module

    Using the swagger-scala module, need to migrate play support into a new module. This is probably best done in a new artifact, and outside of swagger-core.

    Feature 
    opened by fehguy 33
  • Whether an array is required or not should be controlled by `ArraySchema.arraySchema.requiredMode` instead of `ArraySchema.schema.requiredMode`

    Whether an array is required or not should be controlled by `ArraySchema.arraySchema.requiredMode` instead of `ArraySchema.schema.requiredMode`

    After replaced the option required at @Schema annotation by requiredMode on #4286, it seems the issue #3438 is shown again.

    According to the comments of ArraySchema annotation, ArraySchema.schema defines the model of the items within the array, while ArraySchema.arraySchema defines the model for the model of the array itself.

    Example

    In this example, I provide an almost same example at the #3438.

    For the below DTO class:

    public class Person {
        @ArraySchema(
            arraySchema = @Schema(requiredMode = RequiredMode.REQUIRED)
        )
        private List<String> addresses;
    }
    

    I expect the generated special to have (but it's not):

    {
      "Person": {
        "required": [
          "addresses"
        ]
      }
    }
    

    And I need to work around this by:

    public class Person {
        @ArraySchema(
            arraySchema = @Schema(description = "The person"),
            schema = @Schema(requiredMode = RequiredMode.REQUIRED)
        )
        private List<String> addresses;
    }
    
    opened by keigo-brook 0
  • Feature Schema.RequiredMode.AUTO Should Consider Meta-Annotations

    Feature Schema.RequiredMode.AUTO Should Consider Meta-Annotations

    With the changes to @Schema to deprecate the required attribute and replace it with requiredMode in #4286 the auto resolution accounts for annotations directly on the attribute. A nice enhancement would be to also consider any meta-annotations as well. For example:

    I have the following custom annotation

    @Constraint(validatedBy = {})
    @NotNull(message = "must be a valid verification code")
    @Pattern(regexp = VERIFICATION_CODE_REGEX, message = "must be a valid verification code")
    public @interface ValidVerificationCode {
    ...
    }
    

    It would be nice to have this auto resolved as not null as well by the Schema.RequiredMode.AUTO.

    opened by adase11 0
  • Schema annotation processing isn’t working with nullable and

    Schema annotation processing isn’t working with nullable and "null" example

    Expected Behavior

    According to the OpenAPI specification I should be able to write an OpenAPI document that contains null values.

    See for reference: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#data-types https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schemaNullable

    Current Behavior

    If I write the OpenAPI document completely by hand (programmatically or the text document itself) it works without any problems but when I use POJO classes that contains fields annotated with @Schema e.g.: @Schema(nullable = true, example = "null") it doesn’t always work correctly.

    After serialization in the OpenAPI document some fields don’t have an example value at all, and others have converted null values. For the following types from a "null" value it produces:

    • integer, number
      • No example
    • string
      • "null" string value
    • boolean
      • False
    • object, array:
      • null, It works as expected

    I’ve noticed that regardless of the "nullable" property only the object and array types work correctly.

    Possible Solution

    Annotation processing should respect the "nullable" property and if that is true and the example is "null”, and the field has no constraints: it should produce in the OpenAPI document an example with a null value regardless of the annotated data type.

    Steps to Reproduce

    1. Mark a field with any data type (excluding object, array) with @Schema(nullable = true, example = "null").
    2. After serialization in the OpenAPI document it should produce incorrect or missing example fields.

    I’ve created an example web project to test this: https://github.com/bodzso/swagger-nullable-test

    Context (Environment)

    I’m trying to generate an OpenAPI document from POJOs and endpoints. Currently I cannot produce working requests that works with swagger-ui because of the errors described above. As far as I know it isn’t possible to disable default value generation in swagger-ui and with the above errors combined I didn’t find a possible workaround. Writing the entire OpenAPI document by hand isn’t feasible because the generated one is over a thousand lines.

    I’d like to achieve a simple thing: don’t send some optional (nullable) fields in certain examples and don't hide (@Schema(hidden = true)) these fields from the Schema.

    opened by bodzso 1
  • Is there anyway to (de)serialize an OpenAPI object?

    Is there anyway to (de)serialize an OpenAPI object?

    For some reason, I'm using swagger-parser to parse Json to OpenAPI object. However, the json-string is pretty large (about 1MB), it takes about half a minute to analyze it every time, so I want to cache the OpenAPI object in some way. But the OpenAPI class itself does not implement serializable, so I can't do in in native way. Is there any tool for me to realise this?

    opened by SilverLiningSL 0
  • Enable nesting @ArraySchema

    Enable nesting @ArraySchema

    Hi

    While using Springdoc project, I've noticed it's not possible to document the data structure of an endpoint returning a List<List<Integer>>.

    This limitation is due to the fact that @ArraySchema annotation is missing the ability to nest.

    Would it be possible to add this feature in the upcoming version ?

    See my original issue on springdoc github repository.

    opened by Mumeii 0
  • Change DateTimeSchema behavior

    Change DateTimeSchema behavior

    Hi! I want to use example with another pattern in DateTimeSchema. Now DateTimeSchema extends Schema and I can't override example. There are two ways to solve this problem. 1. Change OffsetDateTime on String but I think this can break the behavior which users expect. 2. Change method «clone» in ModelResolver. Replace Json.mapper() on _mapper. This does not break the behavior which users expect and I can only write custom ObjectMapper to change DateTimeSchema extends from StringSchema. I did pull request with branch name clone-by-outer-mapper.

    opened by kuldiegor 0
Releases(v2.2.7)
  • v2.2.7(Nov 15, 2022)

    • deps update and adjust example (de)serialization (#4310)
    • update boolean schema support (#4307)
    • fix handling for case where type.getType() is null (#4299)
    • new ReferenceTypeUtils code fails with IllegalArgumentException with type.getType() is null (#4297)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.9(Nov 15, 2022)

    What's Changed

    • #4103 Support for Jackson reference types by @dpeger in https://github.com/swagger-api/swagger-core/pull/4105
    • enhanced support for additionalProperties by @frantuma in https://github.com/swagger-api/swagger-core/pull/4305

    Full Changelog: https://github.com/swagger-api/swagger-core/compare/v1.6.8...v1.6.9

    Source code(tar.gz)
    Source code(zip)
  • v2.2.6(Nov 2, 2022)

  • v2.2.5(Nov 2, 2022)

    • feat: replace required attribute on @Schema by requiredMode (#4286)
    • allow returning 3.1 schema types in 'getType' (#4285)
    • Fix #4280: Building swagger-core fails on Windows (#4281)
    • Add support for XmlSchema annotation during model generation (#4278)
    • fix #3998 model schema enum values of jackson fields and private methods (#4168)
    • #4103 Support for Jackson reference types (#4106)
    • ref #3911 - gives preferred status to first mapper errors (#3940)
    Source code(tar.gz)
    Source code(zip)
  • v2.2.4(Oct 16, 2022)

  • v1.6.8(Oct 16, 2022)

    What's Changed

    • update deps config and version by @frantuma in https://github.com/swagger-api/swagger-core/pull/4263
    • update jackson databind version by @frantuma in https://github.com/swagger-api/swagger-core/pull/4267
    • bump jackson databind to 2.13.4.2 by @frantuma in https://github.com/swagger-api/swagger-core/pull/4269

    Full Changelog: https://github.com/swagger-api/swagger-core/compare/v1.6.7...v1.6.8

    Source code(tar.gz)
    Source code(zip)
  • v2.2.3(Sep 27, 2022)

    • update v1 versions in README (#4254)
    • bump snake-yaml to 1.32 (#4250)
    • refs #4247 - fix composed schema resolving on props (#4248)
    • refs #4241 - bump snakeyaml to 1.31 (#4242)
    • bump classgraph to 4.8.149 in jakarta artifacts (#4220)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.7(Sep 27, 2022)

    What's Changed

    • refs #4241 - bump snakeyaml to 1.31 by @frantuma in https://github.com/swagger-api/swagger-core/pull/4243
    • bump snake-yaml to 1.32 by @frantuma in https://github.com/swagger-api/swagger-core/pull/4251

    Full Changelog: https://github.com/swagger-api/swagger-core/compare/v1.6.6...v1.6.7

    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Jul 20, 2022)

    • bump classgraph to 4.8.149 (#4217)
    • refs #4212 - update jackson API usage to support Jackson < 2.9 (#4214)
    • Add @JsonTypeName support for wrapped JSON (#4211)
    • update unevaluatedProperties type to Schema (#4208)
    • refs swagger-api/swagger-parser/issues/1757 - boolean schema support for OAS 3.1 (#4206)
    • Json deserialization process should not remove extension for Security Scheme (#4113)
    Source code(tar.gz)
    Source code(zip)
  • v2.2.1(Jun 15, 2022)

    • refs #4167 - fix spec version annotations package to handle java 9+ modules (#4200)
    • schema name null fix (#4193)
    • Added items to Schema equals and hashcode (#4187)
    • update schema setter (#4184)
    • Apply on demand conversion to OAS 3.1 (#4180)
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Apr 4, 2022)

    • refs #4059 - don't ignore with @JsonIgnore(false) (#4157)
    • CVE-2020-36518: Bump jackson-databind to 2.13.2.2 (#4155)
    • cleanup in scope of OAS 3.1 support (#4153)
    • PojoTest: add test with booleans (#4152)
    • Set regex pattern on array (#4151)
    • oas 3.1 - opinionated deterministic schema properties ordering (#4150)
    • accept strings and convert to byte[] in ByteArraySchema (#4147)
    • refs #3853- fix composed schemas ref with fqn TypeNameResolver (#4146)
    • refs #4138 - update jackson to 2.13.2 (#4144)
    • OAS 3.1 Initial support - Schema properties support in annotations - Enhanced Response Schema resolving (#4129)
    • add org.owasp dependency for master (#4125)
    • WhiteSource Configuration Migration (#4107)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.6(Apr 4, 2022)

    What's Changed

    • fix readme v1 by @frantuma in https://github.com/swagger-api/swagger-core/pull/4121
    • add org.owasp dependency by @gracekarina in https://github.com/swagger-api/swagger-core/pull/4126
    • add org.owasp dependency in security profile by @gracekarina in https://github.com/swagger-api/swagger-core/pull/4131
    • bump jackson versions by @frantuma in https://github.com/swagger-api/swagger-core/pull/4158

    Full Changelog: https://github.com/swagger-api/swagger-core/compare/v1.6.5...v1.6.6

    Source code(tar.gz)
    Source code(zip)
  • v2.1.13(Feb 7, 2022)

    • update dependencies (#4117)
    • implement null example serialization (#4112)
    • refs #4095 - remove jcenter() in gradle plugin (#4099)
    • fix readme compatibility header (#4083)
    • add latest v2 release to readme (#4082)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.5(Feb 7, 2022)

    What's Changed

    • deserialize as arrayModel, any model that has items and no specific type defined by @gracekarina in https://github.com/swagger-api/swagger-core/pull/4109
    • refs #4111 - bump commons and guava versions by @frantuma in https://github.com/swagger-api/swagger-core/pull/4114

    Full Changelog: https://github.com/swagger-api/swagger-core/compare/v1.6.4...v1.6.5

    Source code(tar.gz)
    Source code(zip)
  • v2.1.12(Dec 23, 2021)

    • update readme (#4076)
    • bump logback version (#4074)
    • Issue 4041 schema json object defaultValue (#4063)
    • Typo in ModelResolver (#4056)
    • fix: Support enums with unbounded wildcards (#4055)
    • Update README.md (#4051)
    • jknack:handlebars 4.2.1 (#4035)
    • fix #4031 - bump classgraph version, solve CWE-611 (#4032)
    • update README releases list (#4027)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.4(Dec 23, 2021)

    What's Changed

    • update 1.5 Readme with new v2 version 2.1.11 by @sonatypeoss in https://github.com/swagger-api/swagger-core/pull/4026
    • bump logback to 1.2.9 by @frantuma in https://github.com/swagger-api/swagger-core/pull/4073

    Full Changelog: https://github.com/swagger-api/swagger-core/compare/v1.6.3...v1.6.4

    Source code(tar.gz)
    Source code(zip)
  • v2.1.11(Sep 29, 2021)

  • v1.6.3(Sep 29, 2021)

    • #3257 - External Spec validation of required properties isn't possible (#3258)
    • #719 - Adding Extensions in Responses (OAS2) (#2835)
    • add url List to authorizationValue (#3995)
    • add xml to property in ModelToPropertyConverter (#4007)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.10(Jun 28, 2021)

    • refs #3968 refs #3969 - fix security alerts (#3981)
    • addd flag for media type example set value (#3975)
    • Bump Jetty version (test) - address CVE-2021-28169 (#3974)
    • fix typo in maven-wrapper.properties (#3956)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.9(Apr 20, 2021)

  • v2.1.8(Apr 18, 2021)

    • refs #3926 - extended repeatable annotations support (#3931)
    • refs #3904 - annotations support for @JsonValue types (#3930)
    • refs #3011 - fix wrongly ignored operations with empty path (#3929)
    • bump jetty version, exclude json-smart (#3918, #3919, #3920). Partial JsonTypeInfo.As.WRAPPER_OBJECT support (#2884, #2862) (#3921)
    • fix NPE with @JsonIdentityInfo at class level (#3908)
    • guava version in jakarta maven plugin - refs #3840 (#3901)
    • transformer plugin deps update refs #3840, refs #3890, refs #3891 (#3899)
    • Automation: update maven readme version in release (#3898)
    • Fix @JsonUnwrapped does not copy required properties: Resolves #3879 (#3880)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.7(Feb 18, 2021)

    NOTE: First release with Jakarta namespace support. See wiki, maven readme and gradle readme.

    • transformer maven plugin fork not to attach transformed JAR (#3889)
    • CI python 2 launcher (#3885)
    • CI python3 compatible (#3884)
    • fix actions, python print parentheses (#3883)
    • Fix build on Windows OS (#3882)
    • refs #3836 - jakarta namespace artifacts (#3881)
    • Fix unstable ordering of urls in gradle resolve task (#3877)
    • fix #3868 - maven plugin: use prettyPrint from config file (#3874)
    • refs CVE-2020-8908 - bump test dep guava (#3847)
    • Migrate from maven-bundle-plugin to bnd-maven-plugin for finer OSGi meta… (#3843)
    • Failure to run swagger-jaxrs2:2.1.6 in OSGi due to transitive depen… (#3839)
    • fix #3831 - bump groovy version (#3832)
    • whitesource alerts related deps updates - final run (#3825)
    • fix badges (#3824)
    • whitesource alerts related deps updates - fifth run (#3823)
    • whitesource alerts related deps updates - fourth run (#3822)
    • whitesource alerts related deps updates - third run (#3820)
    • whitesource alerts related deps updates - second run (#3819)
    • whitesource alerts related deps updates (#3813)
    • Configure WhiteSource for GitHub.com (#3749)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.6(Dec 4, 2020)

    • automation - allow set-env and add-path (#3744)
    • fix #3741 - log output file path (#3742)
    • refs #3613 - Configurable and deterministic order of JSON and YAML output (#3740)
    • automation - replace deprecated set-env in workflows (#3733)
    • refs #3731 - constraint annotations support at root schema level (#3732)
    • fix #3729 - update testng version (#3730)
    • refs #3727 - fix enum as ref with fqn TypeNameResolver (#3728)
    • bump junit deps (#3720)
    • Add test for hidden field in JsonCreator (#3698)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.5(Oct 1, 2020)

    • refs #3711 - expose ctxId resolving in BaseOpenApiResource (#3712)
    • refs #3703 - fix Optional @Schema resolving (#3707)
    • refs #3697 - fix @Hidden and @Schema.hidden resolving (#3706)
    • refs #2144, refs #3149, refs #3426, refs #3694 - fix overridden generic resources methods (#3705)
    • refs #3643, refs #3282, resolve @Parameter for form params (#3696)
    • refs #3673 - Null check getIgnoredProperties (#3674)
    • Automation - fix V1 Readme updated (#3672)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.4(Jul 25, 2020)

    • refs #2845 - resolve @JsonIgnoreProperties as property annotation (partial support) (#3649)
    • introduce GitHub Actions for releases (#3648, ...)
    • fix jaxrs2 dep version in gradle resolve test (#3639)
    • fix exampleSetFlag for invalid values (#3638)
    • implements exampleSetFlag to flag deserialization of null example vs missing (#3637)
    • Fix omitted char in javadoc (#3636)
    • GitHub Actions build (#3630, #3631, #3632)
    • Create codeql-analysis.yml (#3629)
    • refs #3624 - fix self referenced Optional property (#3627)
    • refs #3608 - fix maven plugin with maven < 3.5 - bump snaphsots (#3620)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.2(Jul 1, 2020)

    • refs #3554 - update jackson to 2.11.1 (#3574)
    • Relax Swagger Core 1.6.x OSGi constraints to allow usage of the Bean Validation API 1.1/2.0 (#3497)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.3(Jun 27, 2020)

    • ref #3554 - bump jackson to 2.11.1 (#3601)
    • refs #3500 - fix @Deprecated processing (#3590)
    • refs #3583 - fix NPE in case of wrongly provided array in @Schema.implementation (#3589)
    • Bug/3587 fix parameter examples order (#3588)
    • refs #3092 - skip hidden properties in @BeanParam annotated schema (#3580)
    • Added support for filterClass to OpenApiServlet (#3572)
    • bump snakeyaml to 1.26 (#3555)
    • Support for overriding enum values with @JsonProperty or @JsonValue (#3553)
    • feature: listing registered converters (#3551)
    • Fix deserializing enum with negative Long values (#3544)
    • Ref #2887 Update Schema.AccessMode.READ_ONLY docs (#3537)
    • Utilize the OpenApiReader interface in ReaderListener method signatures (#3519)
    • Enabling fully qualified java class names (#3510)
    • Minor code clean-up (#3509)
    • Minor code clean-up (#3508)
    • Minor code clean-up (#3507)
    • Minor code clean-up. (#3506)
    • Remove duplicate alternative in ReaderUtils for javax.ws.rs.DELETE (#3501)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Apr 1, 2020)

    • refs #3412 - deprecate swagger-jaxrs2-servlet-initializer add alternative with different package (#3481)

    NOTE swagger-jaxrs2-servlet-initializer artifact is DEPRECATED since 2.1.2 (please see #3412 and #3481), please use instead swagger-jaxrs2-servlet-initializer-v2 (same class io.swagger.v3.jaxrs2.integration.SwaggerServletInitializer)

    • refs #3409 - fix jsonValue processing (#3483)

    • refs #3259 - fix required annotation processing for reference properties (#3482)

    • refs #3438 - fix arraySchema required (#3478)

    • refs #3443 - Resolve java.time.Instant as date-time instead of long (#3477)

    • refs #3464 - change scope of hiddingByJsonView to protected (#3474)

    • refs #3111 - fix Schema.implementation processing for primitive types (#3468)

    • Refs #3399, #3445 Change javax to jakarta artifact dependencies, relax OSGI import (#3467)

    • Classgraph 4.8.65 (#3458)

    • update maven central URLs (#3435)

    • Fix typo in AnnotationsUtils; Fixes #3423 (#3424)

    • refs #3414 - fix enumsAsRef global property behavior (#3417)

    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Apr 1, 2020)

    • update maven central URLs (#3434)
    • Update LICENSE (#3407)
    • swagger-jaxrs: fix path building (#3385)
    • Update extension properties to support parse value (openAPI) (#3377)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Jan 2, 2020)

    • refs #3345 - Include discriminator mapped schemas when filtering (#3381)
    • refs #3365 - fix schema example resolving edge case strings (#3380)
    • remove redundant build status in README (#3374)
    Source code(tar.gz)
    Source code(zip)
Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.

Rest.li is an open source REST framework for building robust, scalable RESTful architectures using type-safe bindings and asynchronous, non-blocking I

LinkedIn 2.3k Dec 29, 2022
Leading REST API framework for Java

Restlet Framework The leading REST API framework for Java Thanks to Restlet Framework's powerful routing and filtering capabilities, unified client an

Restlet Framework 633 Dec 18, 2022
Simple JSP Servlets REST api.

Simple JSP Servlets REST api.

MisterFunny01 3 May 9, 2021
An easy to use api to interact with many versions of minecraft in a version independent environment.

Glass - API An easy to use api to interact with many versions of minecraft in a version independent environment. Setup Instructions should be relative

null 2 Jan 25, 2022
Microserver is a Java 8 native, zero configuration, standards based, battle hardened library to run Java Rest Microservices via a standard Java main class. Supporting pure Microservice or Micro-monolith styles.

Microserver A convenient modular engine for Microservices. Microserver plugins offer seamless integration with Spring (core), Jersey, Guava, Tomcat, G

AOL 936 Dec 19, 2022
Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.

Spring HATEOAS This project provides some APIs to ease creating REST representations that follow the HATEOAS principle when working with Spring and es

Spring 996 Dec 28, 2022
Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.

Spring HATEOAS This project provides some APIs to ease creating REST representations that follow the HATEOAS principle when working with Spring and es

Spring 920 Mar 8, 2021
RestAhead - compile time generated REST client

RestAhead - compile time generated REST client This project draws inspiration from projects such as Retrofit and Feign, but with a twist: your service

Žan Skamljič 13 Dec 24, 2022
Nano-library which provides the ability to define typesafe (!) configuration templates for applications.

Configur8 Nano-library which provides the ability to define typesafe (!) Configuration templates for applications. Concept: A Configuration is a set o

David Denton 11 Oct 3, 2022
Rapidoid - Extremely Fast, Simple and Powerful Java Web Framework and HTTP Server!

Rapidoid - Simple. Powerful. Secure. Fast! Rapidoid is an extremely fast HTTP server and modern Java web framework / application container, with a str

null 1.6k Dec 30, 2022
A Java API wrapper for the pastemyst api

Pastemyst.java What is pastemyst.java? pastemyst.java is a pastemyst API Wrapper, written in Java. The library is in early development, and all contri

YeffyCodeGit 8 Sep 28, 2022
Dio-api-1 - Repositório com os artefatos da mentoria de API

dio-api-1 Repositório com os artefatos da mentoria de API Reference Documentation For further reference, please consider the following sections: Offic

Ricardo Lucas Chagas 5 Feb 25, 2022
API Gestor é uma API que permite a comunicação com um Banco de Dados educacionais sobre a educação brasileira.

API Gestor O projeto API Gestor é uma API que permite a comunicação de outras aplicações com os dados educacionais armazenados em um banco de dados, c

null 2 Apr 13, 2022
A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java.

Discords.com / BotsForDiscord.com Java Library A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java 8. Installation This w

Dorian 3 Aug 6, 2021
绕过安卓hidden api 限制

背景 非 SDK API 名单(谷歌官方) 随着每个 Android 版本的发布,会有更多非 SDK 接口受到限制。 我们知道这些限制会影响您的发布工作流,同时我们希望确保您拥有相关工具来检测非 SDK 接口的使用情况、有机会向我们提供反馈,并且有时间根据相应新政策做出规划和调整。 为最大程度地降低

null 67 Nov 29, 2022
Disable the 1.8x Click delay with this sleek API.

Tecknix Client Click Delay API A simple solution to remove Minecraft 1.8's click delay timer. Installation: Tecknix Click Delay API requires a Bukkit

Tecknix Client 2 Nov 16, 2021
API de Clientes - Java+Quarkus

com.clientes.api Project This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please visit its

null 5 Oct 12, 2021
API RESTful Challenge

developer-challenge API RESTful Challenge API feita com java e hospedada no Heroku #Adicionar país Metodo: [POST] https://challenge-rest-api.herokuapp

Albertino Augusto Marrengule 2 Sep 7, 2022