Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example swagger-codegen-maven-plugin/examples/java-client.xml is out of date #3261

Closed
hello-josh opened this issue Jun 30, 2016 · 4 comments
Closed

Comments

@hello-josh
Copy link

Example dependencies from swagger-codegen-maven-plugin/examples/java-client.xml do not work correctly.

I had to use the generation webservice to extract a pom with the proper dependencies for jersey2

They should be changed to something like this if they are indeed the best practices:

<!-- HTTP client: jersey-client -->
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>${jersey-version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>${jersey-version}</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <version>2.22.1</version>
    </dependency>

    <!-- JSON processing: jackson -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson-version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson-version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson-version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-joda</artifactId>
      <version>2.1.5</version>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>${jodatime-version}</version>
    </dependency>

    <!-- Base64 encoding that works in both JVM and Android -->
    <dependency>
      <groupId>com.brsanthu</groupId>
      <artifactId>migbase64</artifactId>
      <version>2.2</version>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <swagger-core-version>1.5.8</swagger-core-version>
    <jersey-version>2.22.2</jersey-version>
    <jackson-version>2.7.0</jackson-version>
    <jodatime-version>2.9.3</jodatime-version>
    <maven-plugin-version>1.0.0</maven-plugin-version>
    <junit-version>4.12</junit-version>
  </properties>
@wing328
Copy link
Contributor

wing328 commented Jul 1, 2016

@TRII thanks for reporting the issue. May I know if you've cycle to contribute a fix?

@hello-josh
Copy link
Author

I can attempt it but I can't guarantee that the version choices are optimal since I'm new to this library.

@wing328
Copy link
Contributor

wing328 commented Jul 1, 2016

That's ok. The community and the core team can help review the change :)

Let us know if you need help submitting a PR.

@frantuma
Copy link
Member

fixed in #8448

frantuma added a commit that referenced this issue Jul 19, 2018
refs #3261 - fixes maven plugin example jersey version
crumpf added a commit to crumpf/swagger-codegen that referenced this issue Jul 19, 2018
* origin/master:
  refs swagger-api#3261 - fixes maven plugin example jersey version
  refs swagger-api#8359 - Fixed setting of custom header
  Revert "Fix getter methods for Java model with additionalProperties"
  added value to required property on test data.
  comment out docker build and push as causing timeout
  use bash file for docker push in circleCI
  add timeout to circleci
  added mixIn configuration on mapper to fix extra schema (responseSchema) in response.
  fix dockerhub auth
  Reverted file permissions of api_client.mustache and model.mustache to 0644
  setup sbt in circle config
  Make spring-mvc jersey tests wait that jetty is closed before terminating
  Ran ./bin/python-petstore.sh and ./bin/security/python-petstore.sh shell scripts.
  Added the ability for generated Python clients to access the additional properties of models with additionalProperties defined.
  Make usage of -D more explicit in example
  Docker: use correct MAVEN_CONFIG
  fix unit test error remove not needed come
  add provideedIn support
john-french pushed a commit to john-french/swagger-codegen that referenced this issue Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants