Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swagger-api/swagger-samples
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: swagger-api/swagger-samples
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.0
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Mar 30, 2017

  1. Copy the full SHA
    1ffd982 View commit details

Commits on Jun 19, 2017

  1. updated to 3.x versions

    fehguy committed Jun 19, 2017
    Copy the full SHA
    eb4ded7 View commit details
  2. Copy the full SHA
    72a37b4 View commit details
  3. disabled filter

    fehguy committed Jun 19, 2017
    Copy the full SHA
    4dfbb30 View commit details
  4. renamed

    fehguy committed Jun 19, 2017
    Copy the full SHA
    769c067 View commit details
  5. updated deps

    fehguy committed Jun 19, 2017
    Copy the full SHA
    a5d272d View commit details
  6. hack in scanning

    fehguy committed Jun 19, 2017
    Copy the full SHA
    0373073 View commit details
  7. disable filter

    fehguy committed Jun 19, 2017
    Copy the full SHA
    8639fc1 View commit details
  8. update annotations

    fehguy committed Jun 19, 2017
    Copy the full SHA
    35137c9 View commit details
  9. added provider

    fehguy committed Jun 19, 2017
    Copy the full SHA
    7ce11b0 View commit details
  10. enabled pet resource

    fehguy committed Jun 19, 2017
    Copy the full SHA
    9ed0da9 View commit details
  11. added metadata class for info

    fehguy committed Jun 19, 2017
    Copy the full SHA
    e1b7f34 View commit details

Commits on Jun 28, 2017

  1. enabled yaml

    fehguy committed Jun 28, 2017
    Copy the full SHA
    8eea146 View commit details

Commits on Jun 30, 2017

  1. Update PetResource.java

    fehguy authored Jun 30, 2017
    Copy the full SHA
    8b19f0e View commit details

Commits on Jul 3, 2017

  1. added missing import

    webron committed Jul 3, 2017
    Copy the full SHA
    95addce View commit details

Commits on Jul 22, 2017

  1. Copy the full SHA
    79dd2a9 View commit details

Commits on Jul 25, 2017

  1. Copy the full SHA
    52794b3 View commit details
  2. Copy the full SHA
    40576a3 View commit details
  3. Copy the full SHA
    6db5309 View commit details
  4. Copy the full SHA
    dfdeeec View commit details

Commits on Aug 1, 2017

  1. Copy the full SHA
    61096c8 View commit details
  2. Copy the full SHA
    c7fa2cd View commit details
  3. Copy the full SHA
    afb634a View commit details

Commits on Aug 2, 2017

  1. naming cleanup

    frantuma committed Aug 2, 2017
    Copy the full SHA
    ebb060b View commit details
  2. config naming

    frantuma committed Aug 2, 2017
    Copy the full SHA
    16a0650 View commit details

Commits on Aug 11, 2017

  1. samples 2.0 cleanup

    frantuma committed Aug 11, 2017
    Copy the full SHA
    e515333 View commit details

Commits on Aug 21, 2017

  1. Copy the full SHA
    99df121 View commit details
  2. Merge pull request #96 from frantuma/add-resource-classes-example

     add resource classes example
    frantuma authored Aug 21, 2017
    Copy the full SHA
    7998b19 View commit details

Commits on Aug 24, 2017

  1. Copy the full SHA
    3399f76 View commit details
  2. Merge pull request #97 from frantuma/adapt-2394-changes

    adapt swagger-core #2394 changes
    frantuma authored Aug 24, 2017
    Copy the full SHA
    7190751 View commit details

Commits on Sep 26, 2017

  1. update deps versions

    frantuma committed Sep 26, 2017
    Copy the full SHA
    9835aec View commit details
  2. updates sample resources

    frantuma committed Sep 26, 2017
    Copy the full SHA
    ce45fca View commit details
  3. Merge pull request #100 from swagger-api/samples-3.0

    update deps versions and sample resources for openAPI 3.0
    frantuma authored Sep 26, 2017
    Copy the full SHA
    733686c View commit details

Commits on Sep 29, 2017

  1. Copy the full SHA
    e2028cc View commit details
  2. Merge pull request #101 from swagger-api/dropwizard-resources

    updates dropwizard sample resources
    frantuma authored Sep 29, 2017
    Copy the full SHA
    7e51066 View commit details
  3. updates swagger path

    frantuma committed Sep 29, 2017
    Copy the full SHA
    faef9ea View commit details
  4. Merge pull request #102 from swagger-api/fix-exposed-file

    updates swagger path
    frantuma authored Sep 29, 2017
    Copy the full SHA
    7932c14 View commit details

Commits on Oct 13, 2017

  1. fix info annotation

    frantuma committed Oct 13, 2017
    Copy the full SHA
    c9339db View commit details

Commits on Oct 16, 2017

  1. Merge pull request #103 from swagger-api/fix-info-annotation

    fix info annotation
    frantuma authored Oct 16, 2017
    Copy the full SHA
    4c074a4 View commit details

Commits on Oct 25, 2017

  1. Copy the full SHA
    ed6093e View commit details

Commits on Oct 31, 2017

  1. Merge pull request #105 from swagger-api/ticket-2485

    Versioning and naming - refs #2485
    frantuma authored Oct 31, 2017
    Copy the full SHA
    d81edd3 View commit details

Commits on Nov 2, 2017

  1. Copy the full SHA
    b7862d2 View commit details
  2. Merge pull request #106 from swagger-api/integration-initializer

    resteasy and enhanced init options
    frantuma authored Nov 2, 2017
    Copy the full SHA
    a9d5a5b View commit details

Commits on Nov 7, 2017

  1. improved/added samples

    frantuma committed Nov 7, 2017
    Copy the full SHA
    0f90f9f View commit details
  2. Merge pull request #107 from swagger-api/enhanced-jersey-samples

    improved/added samples
    frantuma authored Nov 7, 2017
    Copy the full SHA
    ed47d4a View commit details

Commits on Nov 11, 2017

  1. Copy the full SHA
    5f336a8 View commit details
  2. Merge pull request #108 from swagger-api/ticket-2515

    refs swagger-api/swagger-core#2515 - add jersey sample with resource registration
    frantuma authored Nov 11, 2017
    Copy the full SHA
    42b682e View commit details

Commits on Nov 24, 2017

  1. jetty inflector sample

    gracekarina committed Nov 24, 2017
    Copy the full SHA
    7efd36b View commit details

Commits on Nov 26, 2017

  1. Copy the full SHA
    d415b98 View commit details

Commits on Nov 27, 2017

  1. Copy the full SHA
    2407d1d View commit details
Showing 1,105 changed files with 36,045 additions and 76,694 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -16,3 +16,23 @@ the java library. Each sample contains a README file with details how to run it

---
<img src="http://swagger.io/wp-content/uploads/2016/02/logo.jpg"/>

## Security contact

Please disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.

## License

```
Copyright 2019 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
1 change: 1 addition & 0 deletions java/inflector-dropwizard-guice/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dependency-reduced-pom.xml
2 changes: 1 addition & 1 deletion java/inflector-dropwizard-guice/README.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ java -jar ./target/inflector-dropwizard-guice-sample-1.0.0-SNAPSHOT.jar server s
You can get to the swagger file at:

```
http://localhost:8080/v2/swagger.json
http://localhost:8080/v2/openapi.json
```

Have fun!
129 changes: 84 additions & 45 deletions java/inflector-dropwizard-guice/pom.xml
Original file line number Diff line number Diff line change
@@ -25,18 +25,91 @@
<version>1.0.0-SNAPSHOT</version>

<properties>
<dropwizard-version>0.8.2</dropwizard-version>
<inflector-version>1.0.2</inflector-version>
<jackson.version>2.5.1</jackson.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<dropwizard-version>1.3.1</dropwizard-version>
<inflector-version>2.0.0-SNAPSHOT</inflector-version>
<jackson.version>2.10.3</jackson.version>
<jersey2.version>2.23.1</jersey2.version>
<swagger-core-version>2.0.8-SNAPSHOT</swagger-core-version>
</properties>

<dependencies>

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>${dropwizard-version}</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey2.version}</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>${jersey2.version}</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey2.version}</version>
</dependency>

<dependency>
<groupId>com.hubspot.dropwizard</groupId>
<artifactId>dropwizard-guice</artifactId>
<version>1.0.6.0</version>
<exclusions>
<exclusion>
<artifactId>javax.inject</artifactId>
<groupId>javax.inject</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>annotations</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>aopalliance</artifactId>
<groupId>aopalliance</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.0</version>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
<exclusion>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-inflector</artifactId>
<version>${inflector-version}</version>
<exclusions>
<exclusion>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@@ -79,55 +152,21 @@
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>${dropwizard-version}</version>
</dependency>

<dependency>
<groupId>com.hubspot.dropwizard</groupId>
<artifactId>dropwizard-guice</artifactId>
<version>0.8.0</version>
<exclusions>
<exclusion>
<artifactId>javax.inject</artifactId>
<groupId>javax.inject</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>annotations</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>aopalliance</artifactId>
<groupId>aopalliance</groupId>
</exclusion>
</exclusions>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.0</version>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
<exclusion>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
</exclusion>
</exclusions>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<version>${swagger-core-version}</version>
</dependency>

</dependencies>
Original file line number Diff line number Diff line change
@@ -23,14 +23,15 @@
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.swagger.inflector.SwaggerInflector;
import io.swagger.inflector.config.Configuration;
import io.swagger.inflector.config.ControllerFactory;
import io.swagger.inflector.processors.JsonNodeExampleSerializer;
import io.swagger.inflector.processors.XMLExampleProvider;
import io.swagger.jaxrs.listing.SwaggerSerializers;
import io.swagger.oas.inflector.OpenAPIInflector;
import io.swagger.oas.inflector.config.Configuration;
import io.swagger.oas.inflector.config.ControllerFactory;
import io.swagger.oas.inflector.processors.JsonNodeExampleSerializer;
import io.swagger.oas.inflector.processors.XMLExampleProvider;
import io.swagger.v3.jaxrs2.SwaggerSerializers;
import io.swagger.util.Json;
import io.swagger.util.Yaml;
import io.swagger.v3.oas.models.Operation;
import org.eclipse.jetty.servlets.CrossOriginFilter;
import org.slf4j.LoggerFactory;

@@ -68,7 +69,7 @@ public void run(InflectorServerConfiguration configuration, Environment environm

Configuration config = Configuration.read(configuration.getConfig());
config.setControllerFactory(new GuiceControllerFactory(guiceBundle.getInjector()));
SwaggerInflector inflector = new SwaggerInflector(config);
OpenAPIInflector inflector = new OpenAPIInflector(config);
environment.jersey().getResourceConfig().registerResources(inflector.getResources());

// add serializers for swagger
@@ -91,7 +92,7 @@ public GuiceControllerFactory(Injector injector) {
this.injector = injector;
}

public Object instantiateController(Class cls) throws IllegalAccessException, InstantiationException {
public Object instantiateController(Class cls, Operation operation) throws IllegalAccessException, InstantiationException {
return this.injector.getInstance(cls);
}
}
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

package io.swagger.samples.inflector.dropwizard.controllers;

import io.swagger.inflector.models.RequestContext;
import io.swagger.inflector.models.ResponseContext;
import io.swagger.oas.inflector.models.RequestContext;
import io.swagger.oas.inflector.models.ResponseContext;
import io.swagger.samples.inflector.dropwizard.InflectorServerConfiguration;
import io.swagger.samples.inflector.dropwizard.models.Pet;
import org.apache.commons.io.IOUtils;
Loading