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

[jaxrs-spec] setup test for samples, repair import and dependency #755

Merged

Conversation

fujigon
Copy link
Contributor

@fujigon fujigon commented Aug 7, 2018

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
    @bbdouglas @JFCote @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger
    @wing328

Description of the PR

This patch fixes #726

Changes

  • add pom.xml settings of the project so that generated samples of jaxrs-spec, jaxrs-spec-interface and jaxrs-spec-interface-response are tested
  • fix template to generate correct import
  • fix dependency settings in pom.xml of samples
  • re-generate samples

Disscussion

multipart/form-data related

f8691ed
I googled multipart/form-data related annotation for pure jax-rs, but I came to the conclusion that there'is no suitable one. (So, jersey, apache-cxf and rest-easy define their own annotation to support multipart/form-data).

So, in jaxrs-spec, I deleted the Attachment fileDetail field from the template.
Is this fix OK?

Note

Last commit dc5b9e0 includes only sample re-generation by ./bin/jaxrs-spec-petstore-server*.

<modules>
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
</modules>
</profile>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fujigon Thanks for including jaxrs-spec samples in the Travis CI.

We'll move these tests to CircleCI instead as we've setup both JDK7 and JDK8 to test the change in parallel.

@wing328
Copy link
Member

wing328 commented Aug 7, 2018

So, in jaxrs-spec, I deleted the Attachment fileDetail field from the template.
Is this fix OK?

@fujigon I think it's ok. Thanks for elaborating on the change to make the review easier 👍

Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and the result is good

@wing328 wing328 merged commit 629608c into OpenAPITools:master Aug 7, 2018
@fujigon fujigon deleted the feature/jaxrs-spec-should-be-tested branch August 10, 2018 05:22
@wing328 wing328 changed the title [jaxrs-spec*] samples should be tested. repair import and dependency. [jaxrs-spec*] setup test for samples, repair import and dependency. Aug 14, 2018
@wing328 wing328 changed the title [jaxrs-spec*] setup test for samples, repair import and dependency. [jaxrs-spec*] setup test for samples, repair import and dependency Aug 14, 2018
@wing328 wing328 changed the title [jaxrs-spec*] setup test for samples, repair import and dependency [jaxrs-spec] setup test for samples, repair import and dependency Aug 14, 2018
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
…OpenAPITools#755)

* sample server projects "jaxrs-spec", "jaxrs-spec-interface", and "jaxrs-spec-interface-response" should be tested

* update jax-rs api to 2.1, in which @patch annotation is available
add jackson annotation dependency

* add joda-time to dependency

* modify mustache template to add @JsonCreate, @JsonValue import

* fix return type of enum value() method

* add InputStream import

* Attachment class is in apache cxf. spec should not depend on it

* re-generate sample jaxrs-spec, jaxrs-spec-interface, and jaxrs-spec-interface-response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jaxrs-spec*] samples/server/petstore/jaxrs-spec* are not compilable
2 participants