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

Various fixes #1

Merged
merged 14 commits into from
May 12, 2018
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cache:
- $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings
- $HOME/samples/client/petstore/typescript-angular/node_modules
- $HOME/samples/client/petstore/typescript-angular/typings
- $HOME/perl5

services:
- docker
Expand All @@ -34,6 +35,8 @@ addons:
- petstore.swagger.io

before_install:
# install rust
- $ curl -sSf https://static.rust-lang.org/rustup.sh | sh
# required when sudo: required for the Ruby petstore tests
- gem install bundler
- npm install -g typescript
Expand All @@ -51,8 +54,8 @@ before_install:
- sudo apt-get install -qq bats
- sudo apt-get install -qq curl
# install perl module
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
#- cpanm Test::Exception Test::More Log::Any LWP::UserAgent JSON URI:Query Module::Runtime DateTime Module::Find Moose::Role
# comment out below as installation failed in travis
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
Expand Down
2 changes: 1 addition & 1 deletion CI/pom.xml.circleci
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@
<module>samples/client/petstore/kotlin-threetenbp/</module>
<module>samples/client/petstore/kotlin-string/</module>
<!-- test non-java projects -->
<module>samples/client/petstore/go</module>
<!--<module>samples/client/petstore/go</module>-->
<!-- servers -->
<module>samples/server/petstore/java-vertx/rx</module>
<module>samples/server/petstore/java-vertx/async</module>
Expand Down
2 changes: 1 addition & 1 deletion CI/pom.xml.circleci.java7
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@
<module>samples/client/petstore/java/google-api-client</module>
<module>samples/client/petstore/kotlin/</module>
<!-- test non-java projects -->
<module>samples/client/petstore/go</module>
<!--<module>samples/client/petstore/go</module>-->
<!-- servers -->
<module>samples/server/petstore/java-vertx/rx</module>
<module>samples/server/petstore/java-vertx/async</module>
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# OpenAPI Generator

- Master (2.4.0): [![Build Status](https://img.shields.io/travis/openapitools/openapi-generator/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/openapitools/openapi-generator)
[![Run Status](https://img.shields.io/shippable/5782588a3be4f4faa56c5bea.svg?label=Mustache%20Template%20Test)](https://app.shippable.com/projects/5782588a3be4f4faa56c5bea)
- Master (3.0.0): [![Build Status](https://img.shields.io/travis/openapitools/openapi-generator/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/openapitools/openapi-generator)
[![Run Status](https://img.shields.io/shippable/5782588a3be4f4faa56c5bea/3.0.0.svg?label=Mustache%20Template%20Test)](https://app.shippable.com/github/OpenAPITools/openapi-generator/dashboard)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[![Java Test](https://circleci.com/gh/openapitools/openapi-generator.svg?style=shield)](https://circleci.com/gh/openapitools/openapi-generator)
- 3.0.0: [![Build Status](https://img.shields.io/travis/openapitools/openapi-generator/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/openapitools/openapi-generator)
[![Run Status](https://img.shields.io/shippable/5782588a3be4f4faa56c5bea/3.0.0.svg?label=Mustache%20Template%20Test)](https://app.shippable.com/projects/5782588a3be4f4faa56c5bea)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=3.0.0&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[![Java Test](https://circleci.com/gh/openapitools/openapi-generator/tree/3.0.0.svg?style=shield)](https://circleci.com/gh/openapitools/openapi-generator)


Expand Down
2 changes: 1 addition & 1 deletion bin/windows/rails5-petstore-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l rails5 -o samples\server\petstore\rails5\
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l ruby-on-rails -o samples\server\petstore\rails5\

java %JAVA_OPTS% -jar %executable% %ags%
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
public static final String SERVER_PORT = "serverPort";
/**
/**
* Name of the sub-directory in "src/main/resource" where to find the
* Mustache template for the JAX-RS Codegen.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ public String apiFilename(String templateName, String tag) {
String result = super.apiFilename(templateName, tag);

if (templateName.endsWith("impl-header.mustache")) {
int ix = result.lastIndexOf('/');
int ix = result.lastIndexOf(File.separatorChar);
result = result.substring(0, ix) + result.substring(ix, result.length() - 2) + "Impl.h";
result = result.replace(apiFileFolder(), implFileFolder());
} else if (templateName.endsWith("impl-source.mustache")) {
int ix = result.lastIndexOf('/');
int ix = result.lastIndexOf(File.separatorChar);
result = result.substring(0, ix) + result.substring(ix, result.length() - 4) + "Impl.cpp";
result = result.replace(apiFileFolder(), implFileFolder());
} else if (templateName.endsWith("api-server.mustache")) {
int ix = result.lastIndexOf('/');
int ix = result.lastIndexOf(File.separatorChar);
result = result.substring(0, ix) + result.substring(ix, result.length() - 4) + "MainServer.cpp";
result = result.replace(apiFileFolder(), outputFolder);
}
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,12 @@
</property>
</activation>
<modules>
<!-- <module>samples/server/petstore/erlang-server</module> note: make sample compilation work -->
<!-- clients -->
<!-- elm client not fully ready for CI yet
<module>samples/client/petstore/elm</module>-->
<module>samples/client/petstore/groovy</module>
<module>samples/client/petstore/rust</module>
<module>samples/client/petstore/perl</module>
<!--<module>samples/client/petstore/perl</module>-->
Copy link
Member

Choose a reason for hiding this comment

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

Should this pom match the circlci poms? The go client is commented there and perl is commented here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question but they should not be the same as different CIs should test different clients/servers.

<module>samples/client/petstore/php/OpenAPIClient-php</module>
<module>samples/openapi3/client/petstore/php/OpenAPIClient-php</module>
<module>samples/client/petstore/scala</module>
Expand Down
Loading