diff --git a/README.md b/README.md
index 68e703830f..c7d2f6ba73 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.0`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.1`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[![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)
@@ -83,7 +83,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
---------------------------- | ------------ | -------------------------- | -----
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
-3.2.0 (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
+3.2.1 (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
+[3.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.0) | 06.08.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
[3.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.2) | 25.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
[3.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.1) | 18.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
[3.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.0) | 06.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
@@ -142,16 +143,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
-JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar`
+JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar`
For **Mac/Linux** users:
```sh
-wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar -O openapi-generator-cli.jar
+wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
-Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.1.2/openapi-generator-cli-3.1.2.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
diff --git a/bin/elm-petstore.sh b/bin/elm-petstore.sh
index 714ec137b1..b2020dd868 100755
--- a/bin/elm-petstore.sh
+++ b/bin/elm-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -o samples/client/petstore/elm $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/php-petstore.sh b/bin/openapi3/php-petstore.sh
index ae3624d3bc..4c6c7faf74 100755
--- a/bin/openapi3/php-petstore.sh
+++ b/bin/openapi3/php-petstore.sh
@@ -33,6 +33,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples/openapi3/client/petstore/php $@"
+ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples/openapi3/client/petstore/php/OpenAPIClient-php $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/php-silex-petstore-server.sh b/bin/openapi3/php-silex-petstore-server.sh
index cf3b8c816b..420eaf5a57 100755
--- a/bin/openapi3/php-silex-petstore-server.sh
+++ b/bin/openapi3/php-silex-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-silex -o samples/server/petstore/php-silex $@"
+ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-silex -o samples/server/petstore/php-silex/OpenAPIServer $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/php-symfony-petstore.sh b/bin/openapi3/php-symfony-petstore.sh
index ec0e4da539..48c5eb8d5b 100755
--- a/bin/openapi3/php-symfony-petstore.sh
+++ b/bin/openapi3/php-symfony-petstore.sh
@@ -23,7 +23,7 @@ if [ ! -d "${APP_DIR}" ]; then
fi
# Make sure that we are regenerating the sample by removing any existing target directory
-TARGET_DIR="$SCRIPT_DIR/../../samples/server/petstore/php-symfony"
+TARGET_DIR="$SCRIPT_DIR/../../samples/server/petstore/php-symfony/SymfonyBundle-php"
if [ -d "$TARGET_DIR" ]; then
rm -rf $TARGET_DIR
fi
diff --git a/bin/php-petstore.sh b/bin/php-petstore.sh
index 43cab5dbbd..32bdc918b1 100755
--- a/bin/php-petstore.sh
+++ b/bin/php-petstore.sh
@@ -33,6 +33,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples/client/petstore/php $@"
+ags="generate -t modules/openapi-generator/src/main/resources/php -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples/client/petstore/php/OpenAPIClient-php $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/php-silex-petstore-server.sh b/bin/php-silex-petstore-server.sh
index 9219e51a4d..36b2114403 100755
--- a/bin/php-silex-petstore-server.sh
+++ b/bin/php-silex-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php-silex -o samples/server/petstore/php-silex $@"
+ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php-silex -o samples/server/petstore/php-silex/OpenAPIServer $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/php-symfony-petstore.sh b/bin/php-symfony-petstore.sh
index a3acaca76f..a6080d9e5c 100755
--- a/bin/php-symfony-petstore.sh
+++ b/bin/php-symfony-petstore.sh
@@ -23,7 +23,7 @@ if [ ! -d "${APP_DIR}" ]; then
fi
# Make sure that we are regenerating the sample by removing any existing target directory
-TARGET_DIR="$SCRIPT_DIR/../samples/server/petstore/php-symfony"
+TARGET_DIR="$SCRIPT_DIR/../samples/server/petstore/php-symfony/SymfonyBundle-php"
if [ -d "$TARGET_DIR" ]; then
rm -rf $TARGET_DIR
fi
diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date
index 26975fdd3e..e5fc703d57 100755
--- a/bin/utils/ensure-up-to-date
+++ b/bin/utils/ensure-up-to-date
@@ -30,7 +30,7 @@ sleep 5
./bin/typescript-node-petstore-all.sh > /dev/null 2>&1
./bin/typescript-inversify-petstore.sh > /dev/null 2>&1
./bin/rust-server-petstore.sh > /dev/null 2>&1
-
+./bin/openapi3/haskell-http-client-petstore.sh > /dev/null 2>&1
# Check:
if [ -n "$(git status --porcelain)" ]; then
diff --git a/bin/windows/php-petstore.bat b/bin/windows/php-petstore.bat
index 0a8f53baf2..dc42006723 100755
--- a/bin/windows/php-petstore.bat
+++ b/bin/windows/php-petstore.bat
@@ -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 -g php -o samples\client\petstore\php
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g php -o samples\client\petstore\php\OpenAPIClient-php
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/php-silex-petstore-server.bat b/bin/windows/php-silex-petstore-server.bat
index 7e1584d504..f4da288933 100644
--- a/bin/windows/php-silex-petstore-server.bat
+++ b/bin/windows/php-silex-petstore-server.bat
@@ -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 -g php-silex -o samples\server\petstore\php-silex
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g php-silex -o samples\server\petstore\php-silex\OpenAPIServer
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/php-symfony-petstore-server.bat b/bin/windows/php-symfony-petstore-server.bat
index 578b807bab..5a7ce4f218 100644
--- a/bin/windows/php-symfony-petstore-server.bat
+++ b/bin/windows/php-symfony-petstore-server.bat
@@ -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 -g php-symfony -o samples\server\petstore\php-symfony
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g php-symfony -o samples\server\petstore\php-symfony\SymfonyBundle-php
java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/docs/qna.md b/docs/qna.md
index e5e3cfc74f..d8681f8cde 100644
--- a/docs/qna.md
+++ b/docs/qna.md
@@ -2,41 +2,40 @@
#### What is the governance structure of the OpenAPI Generator project?
-OpenAPI generator (openapi-generator) is managed by the [core team members](../README.md#openapi-generator-core-team).
+OpenAPI generator (openapi-generator) is managed by the members of the [core team](../README.md#openapi-generator-core-team).
+
+
+#### What is the difference between Swagger Codegen and OpenAPI Generator?
+
+Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members.
+
+Swagger is a trademark owned by SmartBear and the use of the term "Swagger" in this project is for demo (reference) purposes only.
#### Why was it decided to fork Swagger Codegen and to maintain a community-driven version?
There are several reasons:
-1. The founding members came to the conclusion that Swagger Codegen 3.0.0 beta contains too many breaking changes while they strongly believe 3.0.0 release should only focus on one thing: OpenAPI specification 3.0 support.
-1. Swagger Codegen 3.0.0 beta was evaluated as unstable. Changes made directly to 3.0.0 branch without reviews or tests, were breaking the builds from time to time (e.g. a simple `mvn clean package` failed).
-1. Reviews of code changes in the 3.0.0 branch highlighted a lot of code block removal without any reason. This might produce regressions for edge cases discovered previously.
-1. Most of the test cases in the generators have been commented out as part of the migration to support OpenAPI 3.0. Test cases are the most valuable assets of the project and should be maintained to ensure a good quality.
-1. According to SmartBear, [Swagger Codegen 2.x and 3.x should be supported in parallel for a while](https://github.com/swagger-api/swagger-codegen/issues/7754#issuecomment-375039048) without the possibility to work with git branches to merge the fixes from one branch to the next. Having to implement everything twice is not a good idea and the best use of the Swagger Codegen community resources.
-1. Having a community-driven version can bring the project to the next level.
+1. The founding members came to the conclusion that Swagger Codegen 3.0.0 beta contains too many breaking changes. They also strongly believe the 3.0.0 release should only focus on one thing: OpenAPI 3.0 support.
+1. The founding members had concerns about the development practices, which seemed to be contributing to an unstable and insufficiently tested codebase.
+1. There was a disagreement on the evolutionary strategy for Swagger Codegen. The founding members felt it was important to move forward with OpenAPI 3.0 support, while maintaining backward compatibility with OpenAPI 2.0 in the same codebase.
+1. The founding members found that the enhancements and bug fixes submitted for Swagger Codegen 2.x need to be submitted again for Swagger Codegen 3.0.0 branch (otherwise, these changes would not appear in the 3.0.0 branch. Having to do the pull request twice is not the best use of community resources).
+1. The community-driven version has a more rapid [release cycle](https://github.com/OpenAPITools/openapi-generator/releases/) (weekly patch release, monthly minor release) so users do not need to wait for several months to get a stable release.
+1. Having a community-driven version _can_ bring the project to the next level with reliable releases and a clear [roadmap](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/roadmap.adoc).
-UPDATE: After the public launch of OpenAPI Generator, some of the core team members were contacted by Ron (SmartBear) and we explained to him the reasons of the fork as explained above. We also asked him to contact team@openapitools.org if he wants to discuss further but so far we don't see any email from him to team@openapitools.org.
+#### Was anything done to attempt to address the issues before deciding to fork Swagger Codegen and maintain a community-driven version?
-#### Has anything been done in attempt to address the issues before deciding to fork Swagger Codegen and maintain a community-driven version?
-
-There were several conversations with SmartBear (Ron, Hugo) via emails, gitter, Skype call and GitHub issues.
+There were several conversations with the project owners of Swagger Codegen via emails, Gitter, Skype call and GitHub issues to discuss the state of Swagger Codegen 3.0.0.
But there was no consensus on the next steps and on the direction for Swagger Codegen 3.0.0.
-#### Is there any change to the project license?
+#### Are there any changes to the project license?
-No, OpenAPI Generator is still using [Apache license (version 2)](https://www.apache.org/licenses/LICENSE-2.0).
+No, OpenAPI Generator is still using the [Apache license (version 2)](https://www.apache.org/licenses/LICENSE-2.0).
-#### What is the difference between Swagger Codegen and OpenAPI Generator?
+#### I am currently using Swagger Codegen 2.x. How can I upgrade the generator to OpenAPI Generator?
-Swagger Codegen is driven by SmartBear while OpenAPI Generator is driven by the community. More than 40 top contributors and template creators of Swagger Codegen have joined OpenAPI Generator as the founding team members.
+OpenAPI Generator is based on Swagger Codegen `2.4.0-SNAPSHOT` version so the migration should be relatively straightforward. Refer to the [migration guide](migration-from-swagger-codegen.md) for more information.
-Swagger is a trademark owned by SmartBear and the use of the term "Swagger" found in this project is for demo purpose (reference) only.
+#### Who maintains this Q&A page?
-#### I’m currently using Swagger Codegen 2.x. How can I upgrade the generator to OpenAPI Generator?
-
-OpenAPI Generator is based on Swagger Codegen 2.4.0-SNAPSHOT version so the migration should be easy, straightforward and almost seamless. Please refer to the [migration guide](migration-from-swagger-codegen.md) for more information.
-
-#### May I know who maintains this Q&A page?
-
-This Q&A page is maintained by the [core team members](../README.md#openapi-generator-core-team). It's not maintained by a single person nor do these Q&As represent the view of an individual.
+This Q&A page is maintained by the [core team members](../README.md#openapi-generator-core-team). It is not maintained by a single person nor do these Q&As represent the views of any individual or person.
diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md
index b3d5dfc4f0..ec7af537cc 100644
--- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md
+++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md
@@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
```bash
-gradle -PopenApiGeneratorVersion=3.1.2 openApiValidate
+gradle -PopenApiGeneratorVersion=3.2.0 openApiValidate
```
diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
index 377022d80b..d5831f0ded 100644
--- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
+++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
@@ -1 +1 @@
-openApiGeneratorVersion=3.1.2
+openApiGeneratorVersion=3.2.0
diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md
index 2a541850bc..ddd40d81bf 100644
--- a/modules/openapi-generator-maven-plugin/README.md
+++ b/modules/openapi-generator-maven-plugin/README.md
@@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
org.openapitools
openapi-generator-maven-plugin
- 3.1.2
+ 3.2.0
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
index f6b2959fd2..abc94c73ee 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
@@ -46,7 +46,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPhpCodegen.class);
public static final String VARIABLE_NAMING_CONVENTION = "variableNamingConvention";
- public static final String PACKAGE_PATH = "packagePath";
+ public static final String PACKAGE_NAME = "packageName";
public static final String SRC_BASE_PATH = "srcBasePath";
// composerVendorName/composerProjectName has be replaced by gitUserId/gitRepoId. prepare to remove these.
// public static final String COMPOSER_VENDOR_NAME = "composerVendorName";
@@ -54,7 +54,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
// protected String composerVendorName = null;
// protected String composerProjectName = null;
protected String invokerPackage = "php";
- protected String packagePath = "php-base";
+ protected String packageName = "php-base";
protected String artifactVersion = null;
protected String srcBasePath = "lib";
protected String testBasePath = "test";
@@ -140,8 +140,8 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
cliOptions.add(new CliOption(VARIABLE_NAMING_CONVENTION, "naming convention of variable name, e.g. camelCase.")
.defaultValue("snake_case"));
cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, "The main namespace to use for all classes. e.g. Yay\\Pets"));
- cliOptions.add(new CliOption(PACKAGE_PATH, "The main package name for classes. e.g. GeneratedPetstore"));
- cliOptions.add(new CliOption(SRC_BASE_PATH, "The directory under packagePath to serve as source root."));
+ cliOptions.add(new CliOption(PACKAGE_NAME, "The main package name for classes. e.g. GeneratedPetstore"));
+ cliOptions.add(new CliOption(SRC_BASE_PATH, "The directory to serve as source root."));
// cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next openapi-generator release"));
cliOptions.add(new CliOption(CodegenConstants.GIT_USER_ID, CodegenConstants.GIT_USER_ID_DESC));
// cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next openapi-generator release"));
@@ -153,10 +153,10 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
public void processOpts() {
super.processOpts();
- if (additionalProperties.containsKey(PACKAGE_PATH)) {
- this.setPackagePath((String) additionalProperties.get(PACKAGE_PATH));
+ if (additionalProperties.containsKey(PACKAGE_NAME)) {
+ this.setPackageName((String) additionalProperties.get(PACKAGE_NAME));
} else {
- additionalProperties.put(PACKAGE_PATH, packagePath);
+ additionalProperties.put(PACKAGE_NAME, packageName);
}
if (additionalProperties.containsKey(SRC_BASE_PATH)) {
@@ -236,16 +236,12 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
// make test path available in mustache template
additionalProperties.put("testBasePath", testBasePath);
- // // apache v2 license
- // supportingFiles.add(new SupportingFile("LICENSE", getPackagePath(), "LICENSE"));
+ // apache v2 license
+ // supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
}
- public String getPackagePath() {
- return packagePath;
- }
-
- public String toPackagePath(String packageName, String basePath) {
- return (getPackagePath() + File.separatorChar + toSrcPath(packageName, basePath));
+ public String getPackageName() {
+ return packageName;
}
public String toSrcPath(String packageName, String basePath) {
@@ -287,32 +283,32 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
@Override
public String apiFileFolder() {
- return (outputFolder + File.separator + toPackagePath(apiPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(apiPackage, srcBasePath));
}
@Override
public String modelFileFolder() {
- return (outputFolder + File.separator + toPackagePath(modelPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(modelPackage, srcBasePath));
}
@Override
public String apiTestFileFolder() {
- return (outputFolder + File.separator + getPackagePath() + File.separator + testBasePath + File.separator + apiDirName);
+ return (outputFolder + File.separator + testBasePath + File.separator + apiDirName);
}
@Override
public String modelTestFileFolder() {
- return (outputFolder + File.separator + getPackagePath() + File.separator + testBasePath + File.separator + modelDirName);
+ return (outputFolder + File.separator + testBasePath + File.separator + modelDirName);
}
@Override
public String apiDocFileFolder() {
- return (outputFolder + File.separator + getPackagePath() + File.separator + apiDocPath);
+ return (outputFolder + File.separator + apiDocPath);
}
@Override
public String modelDocFileFolder() {
- return (outputFolder + File.separator + getPackagePath() + File.separator + modelDocPath);
+ return (outputFolder + File.separator + modelDocPath);
}
@Override
@@ -382,8 +378,8 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
this.artifactVersion = artifactVersion;
}
- public void setPackagePath(String packagePath) {
- this.packagePath = packagePath;
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
}
public void setSrcBasePath(String srcBasePath) {
@@ -496,6 +492,12 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
operationId = "call_" + operationId;
}
+ // operationId starts with a number
+ if (operationId.matches("^\\d.*")) {
+ LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + camelize(sanitizeName("call_" + operationId), true));
+ operationId = "call_" + operationId;
+ }
+
return camelize(sanitizeName(operationId), true);
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java
index 5d17ba457b..e4c05b0118 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java
@@ -51,7 +51,7 @@ public class PhpClientCodegen extends AbstractPhpCodegen {
setInvokerPackage("OpenAPI\\Client");
setApiPackage(getInvokerPackage() + "\\" + apiDirName);
setModelPackage(getInvokerPackage() + "\\" + modelDirName);
- setPackagePath("OpenAPIClient-php");
+ setPackageName("OpenAPIClient-php");
supportsInheritance = true;
setOutputDir("generated-code" + File.separator + "php");
modelTestTemplateFiles.put("model_test.mustache", ".php");
@@ -103,17 +103,17 @@ public class PhpClientCodegen extends AbstractPhpCodegen {
additionalProperties.put(COMPOSER_VENDOR_NAME, composerVendorName);
}
- supportingFiles.add(new SupportingFile("ApiException.mustache", toPackagePath(invokerPackage, srcBasePath), "ApiException.php"));
- supportingFiles.add(new SupportingFile("Configuration.mustache", toPackagePath(invokerPackage, srcBasePath), "Configuration.php"));
- supportingFiles.add(new SupportingFile("ObjectSerializer.mustache", toPackagePath(invokerPackage, srcBasePath), "ObjectSerializer.php"));
- supportingFiles.add(new SupportingFile("ModelInterface.mustache", toPackagePath(modelPackage, srcBasePath), "ModelInterface.php"));
- supportingFiles.add(new SupportingFile("HeaderSelector.mustache", toPackagePath(invokerPackage, srcBasePath), "HeaderSelector.php"));
- supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
- supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));
- supportingFiles.add(new SupportingFile("phpunit.xml.mustache", getPackagePath(), "phpunit.xml.dist"));
- supportingFiles.add(new SupportingFile(".travis.yml", getPackagePath(), ".travis.yml"));
- supportingFiles.add(new SupportingFile(".php_cs", getPackagePath(), ".php_cs"));
- supportingFiles.add(new SupportingFile("git_push.sh.mustache", getPackagePath(), "git_push.sh"));
+ supportingFiles.add(new SupportingFile("ApiException.mustache", toSrcPath(invokerPackage, srcBasePath), "ApiException.php"));
+ supportingFiles.add(new SupportingFile("Configuration.mustache", toSrcPath(invokerPackage, srcBasePath), "Configuration.php"));
+ supportingFiles.add(new SupportingFile("ObjectSerializer.mustache", toSrcPath(invokerPackage, srcBasePath), "ObjectSerializer.php"));
+ supportingFiles.add(new SupportingFile("ModelInterface.mustache", toSrcPath(modelPackage, srcBasePath), "ModelInterface.php"));
+ supportingFiles.add(new SupportingFile("HeaderSelector.mustache", toSrcPath(invokerPackage, srcBasePath), "HeaderSelector.php"));
+ supportingFiles.add(new SupportingFile("composer.mustache", "", "composer.json"));
+ supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
+ supportingFiles.add(new SupportingFile("phpunit.xml.mustache", "", "phpunit.xml.dist"));
+ supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
+ supportingFiles.add(new SupportingFile(".php_cs", "", ".php_cs"));
+ supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
}
public void setComposerVendorName(String composerVendorName) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java
index 081041fa24..0d4f91181d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java
@@ -85,8 +85,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
* packPath
*/
invokerPackage = "php-laravel";
- packagePath = "";
- outputFolder = packagePath + File.separator + srcBasePath;
+ outputFolder = srcBasePath;
/*
* Api Package. Optional, if needed, this can be used in templates
@@ -96,7 +95,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
/*
* Model Package. Optional, if needed, this can be used in templates
*/
- modelPackage = "app.Models";
+ modelPackage = "app\\Models";
// template files want to be ignored
apiTestTemplateFiles.clear();
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java
index 51c2751b4b..e66505eadf 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java
@@ -65,7 +65,6 @@ public class PhpLumenServerCodegen extends AbstractPhpCodegen {
* packPath
*/
invokerPackage = "lumen";
- packagePath = "";
/*
* Api Package. Optional, if needed, this can be used in templates
@@ -94,37 +93,37 @@ public class PhpLumenServerCodegen extends AbstractPhpCodegen {
* entire object tree available. If the input file has a suffix of `.mustache
* it will be processed by the template engine. Otherwise, it will be copied
*/
- supportingFiles.add(new SupportingFile(".env.example", packagePath + File.separator + srcBasePath, ".env.example"));
- supportingFiles.add(new SupportingFile("storage_logs_.gitignore", packagePath + File.separator + srcBasePath + File.separator + "storage" + File.separator + "logs", ".gitignore"));
- supportingFiles.add(new SupportingFile("artisan", packagePath + File.separator + srcBasePath, "artisan"));
- supportingFiles.add(new SupportingFile("composer.mustache", packagePath + File.separator + srcBasePath, "composer.json"));
- supportingFiles.add(new SupportingFile("readme.md", packagePath + File.separator + srcBasePath, "readme.md"));
- supportingFiles.add(new SupportingFile("User.php", packagePath + File.separator + srcBasePath + File.separator + "app", "User.php"));
- supportingFiles.add(new SupportingFile("Kernel.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Console", "Kernel.php"));
- supportingFiles.add(new SupportingFile(".gitkeep", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Console" + File.separator + "Commands", ".gitkeep"));
- supportingFiles.add(new SupportingFile("Event.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Events", "Event.php"));
- supportingFiles.add(new SupportingFile("ExampleEvent.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Events", "ExampleEvent.php"));
- supportingFiles.add(new SupportingFile("Handler.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Exceptions", "Handler.php"));
- supportingFiles.add(new SupportingFile("Controller.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "Controller.php"));
- supportingFiles.add(new SupportingFile("ExampleController.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "ExampleController.php"));
- supportingFiles.add(new SupportingFile("Authenticate.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "Authenticate.php"));
- supportingFiles.add(new SupportingFile("ExampleMiddleware.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "ExampleMiddleware.php"));
- supportingFiles.add(new SupportingFile("ExampleJob.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Jobs", "ExampleJob.php"));
- supportingFiles.add(new SupportingFile("Job.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Jobs", "Job.php"));
- supportingFiles.add(new SupportingFile("ExampleListener.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Listeners", "ExampleListener.php"));
- supportingFiles.add(new SupportingFile("AppServiceProvider.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Providers", "AppServiceProvider.php"));
- supportingFiles.add(new SupportingFile("AuthServiceProvider.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Providers", "AuthServiceProvider.php"));
- supportingFiles.add(new SupportingFile("EventServiceProvider.php", packagePath + File.separator + srcBasePath + File.separator + "app" + File.separator + "Providers", "EventServiceProvider.php"));
- supportingFiles.add(new SupportingFile("app.php", packagePath + File.separator + srcBasePath + File.separator + "bootstrap", "app.php"));
- supportingFiles.add(new SupportingFile("ModelFactory.php", packagePath + File.separator + srcBasePath + File.separator + "database" + File.separator + "factories", "ModelFactory.php"));
- supportingFiles.add(new SupportingFile(".gitkeep", packagePath + File.separator + srcBasePath + File.separator + "database" + File.separator + "migrations", ".gitkeep"));
- supportingFiles.add(new SupportingFile("DatabaseSeeder.php", packagePath + File.separator + srcBasePath + File.separator + "database" + File.separator + "seeds", "DatabaseSeeder.php"));
- supportingFiles.add(new SupportingFile(".htaccess", packagePath + File.separator + srcBasePath + File.separator + "public", ".htaccess"));
- supportingFiles.add(new SupportingFile("index.php", packagePath + File.separator + srcBasePath + File.separator + "public", "index.php"));
- supportingFiles.add(new SupportingFile(".gitkeep", packagePath + File.separator + srcBasePath + File.separator + "resources" + File.separator + "views", ".gitkeep"));
- supportingFiles.add(new SupportingFile("routes.mustache", packagePath + File.separator + srcBasePath + File.separator + "routes", "web.php"));
- supportingFiles.add(new SupportingFile("ExampleTest.php", packagePath + File.separator + srcBasePath + File.separator + "tests", "ExampleTest.php"));
- supportingFiles.add(new SupportingFile("TestCase.php", packagePath + File.separator + srcBasePath + File.separator + "tests", "TestCase.php"));
+ supportingFiles.add(new SupportingFile(".env.example", srcBasePath, ".env.example"));
+ supportingFiles.add(new SupportingFile("storage_logs_.gitignore", srcBasePath + File.separator + "storage" + File.separator + "logs", ".gitignore"));
+ supportingFiles.add(new SupportingFile("artisan", srcBasePath, "artisan"));
+ supportingFiles.add(new SupportingFile("composer.mustache", srcBasePath, "composer.json"));
+ supportingFiles.add(new SupportingFile("readme.md", srcBasePath, "readme.md"));
+ supportingFiles.add(new SupportingFile("User.php", srcBasePath + File.separator + "app", "User.php"));
+ supportingFiles.add(new SupportingFile("Kernel.php", srcBasePath + File.separator + "app" + File.separator + "Console", "Kernel.php"));
+ supportingFiles.add(new SupportingFile(".gitkeep", srcBasePath + File.separator + "app" + File.separator + "Console" + File.separator + "Commands", ".gitkeep"));
+ supportingFiles.add(new SupportingFile("Event.php", srcBasePath + File.separator + "app" + File.separator + "Events", "Event.php"));
+ supportingFiles.add(new SupportingFile("ExampleEvent.php", srcBasePath + File.separator + "app" + File.separator + "Events", "ExampleEvent.php"));
+ supportingFiles.add(new SupportingFile("Handler.php", srcBasePath + File.separator + "app" + File.separator + "Exceptions", "Handler.php"));
+ supportingFiles.add(new SupportingFile("Controller.php", srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "Controller.php"));
+ supportingFiles.add(new SupportingFile("ExampleController.php", srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers" + File.separator, "ExampleController.php"));
+ supportingFiles.add(new SupportingFile("Authenticate.php", srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "Authenticate.php"));
+ supportingFiles.add(new SupportingFile("ExampleMiddleware.php", srcBasePath + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware" + File.separator, "ExampleMiddleware.php"));
+ supportingFiles.add(new SupportingFile("ExampleJob.php", srcBasePath + File.separator + "app" + File.separator + "Jobs", "ExampleJob.php"));
+ supportingFiles.add(new SupportingFile("Job.php", srcBasePath + File.separator + "app" + File.separator + "Jobs", "Job.php"));
+ supportingFiles.add(new SupportingFile("ExampleListener.php", srcBasePath + File.separator + "app" + File.separator + "Listeners", "ExampleListener.php"));
+ supportingFiles.add(new SupportingFile("AppServiceProvider.php", srcBasePath + File.separator + "app" + File.separator + "Providers", "AppServiceProvider.php"));
+ supportingFiles.add(new SupportingFile("AuthServiceProvider.php", srcBasePath + File.separator + "app" + File.separator + "Providers", "AuthServiceProvider.php"));
+ supportingFiles.add(new SupportingFile("EventServiceProvider.php", srcBasePath + File.separator + "app" + File.separator + "Providers", "EventServiceProvider.php"));
+ supportingFiles.add(new SupportingFile("app.php", srcBasePath + File.separator + "bootstrap", "app.php"));
+ supportingFiles.add(new SupportingFile("ModelFactory.php", srcBasePath + File.separator + "database" + File.separator + "factories", "ModelFactory.php"));
+ supportingFiles.add(new SupportingFile(".gitkeep", srcBasePath + File.separator + "database" + File.separator + "migrations", ".gitkeep"));
+ supportingFiles.add(new SupportingFile("DatabaseSeeder.php", srcBasePath + File.separator + "database" + File.separator + "seeds", "DatabaseSeeder.php"));
+ supportingFiles.add(new SupportingFile(".htaccess", srcBasePath + File.separator + "public", ".htaccess"));
+ supportingFiles.add(new SupportingFile("index.php", srcBasePath + File.separator + "public", "index.php"));
+ supportingFiles.add(new SupportingFile(".gitkeep", srcBasePath + File.separator + "resources" + File.separator + "views", ".gitkeep"));
+ supportingFiles.add(new SupportingFile("routes.mustache", srcBasePath + File.separator + "routes", "web.php"));
+ supportingFiles.add(new SupportingFile("ExampleTest.php", srcBasePath + File.separator + "tests", "ExampleTest.php"));
+ supportingFiles.add(new SupportingFile("TestCase.php", srcBasePath + File.separator + "tests", "TestCase.php"));
}
// override with any special post-processing
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java
index fb82526aba..25142203cc 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java
@@ -46,9 +46,9 @@ public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf
super();
invokerPackage = camelize("OpenAPIServer");
- String packagePath = "OpenAPIServer";
- modelPackage = packagePath + File.separator + "lib" + File.separator + "models";
- apiPackage = packagePath + File.separator + "lib";
+ String packageName = "OpenAPIServer";
+ modelPackage = "lib" + File.separator + "models";
+ apiPackage = "lib";
outputFolder = "generated-code" + File.separator + "php-silex";
// no model, api files
@@ -112,10 +112,10 @@ public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf
// mapped to String as a workaround
typeMapping.put("binary", "string");
- supportingFiles.add(new SupportingFile("README.mustache", packagePath.replace('/', File.separatorChar), "README.md"));
- supportingFiles.add(new SupportingFile("composer.json", packagePath.replace('/', File.separatorChar), "composer.json"));
- supportingFiles.add(new SupportingFile("index.mustache", packagePath.replace('/', File.separatorChar), "index.php"));
- supportingFiles.add(new SupportingFile(".htaccess", packagePath.replace('/', File.separatorChar), ".htaccess"));
+ supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
+ supportingFiles.add(new SupportingFile("composer.json", "", "composer.json"));
+ supportingFiles.add(new SupportingFile("index.mustache", "", "index.php"));
+ supportingFiles.add(new SupportingFile(".htaccess", "", ".htaccess"));
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java
index e7e49afc7f..15ef0a43e4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java
@@ -47,7 +47,6 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
variableNamingConvention = "camelCase";
artifactVersion = "1.0.0";
- packagePath = ""; // empty packagePath (top folder)
setInvokerPackage("OpenAPIServer");
apiPackage = invokerPackage + "\\" + apiDirName;
modelPackage = invokerPackage + "\\" + modelDirName;
@@ -92,32 +91,32 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
public String apiFileFolder() {
if (apiPackage.matches("^" + invokerPackage + "\\\\*(.+)")) {
// need to strip out invokerPackage from path
- return (outputFolder + File.separator + toPackagePath(apiPackage.replaceFirst("^" + invokerPackage + "\\\\*(.+)", "$1"), srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(apiPackage.replaceFirst("^" + invokerPackage + "\\\\*(.+)", "$1"), srcBasePath));
}
- return (outputFolder + File.separator + toPackagePath(apiPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(apiPackage, srcBasePath));
}
@Override
public String modelFileFolder() {
if (modelPackage.matches("^" + invokerPackage + "\\\\*(.+)")) {
// need to strip out invokerPackage from path
- return (outputFolder + File.separator + toPackagePath(modelPackage.replaceFirst("^" + invokerPackage + "\\\\*(.+)", "$1"), srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(modelPackage.replaceFirst("^" + invokerPackage + "\\\\*(.+)", "$1"), srcBasePath));
}
- return (outputFolder + File.separator + toPackagePath(modelPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(modelPackage, srcBasePath));
}
@Override
public void processOpts() {
super.processOpts();
- supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));
- supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
- supportingFiles.add(new SupportingFile("index.mustache", getPackagePath(), "index.php"));
- supportingFiles.add(new SupportingFile(".htaccess", getPackagePath(), ".htaccess"));
- supportingFiles.add(new SupportingFile(".gitignore", getPackagePath(), ".gitignore"));
+ supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
+ supportingFiles.add(new SupportingFile("composer.mustache", "", "composer.json"));
+ supportingFiles.add(new SupportingFile("index.mustache", "", "index.php"));
+ supportingFiles.add(new SupportingFile(".htaccess", "", ".htaccess"));
+ supportingFiles.add(new SupportingFile(".gitignore", "", ".gitignore"));
supportingFiles.add(new SupportingFile("AbstractApiController.mustache", toSrcPath(invokerPackage, srcBasePath), "AbstractApiController.php"));
supportingFiles.add(new SupportingFile("SlimRouter.mustache", toSrcPath(invokerPackage, srcBasePath), "SlimRouter.php"));
- supportingFiles.add(new SupportingFile("phpunit.xml.mustache", getPackagePath(), "phpunit.xml.dist"));
+ supportingFiles.add(new SupportingFile("phpunit.xml.mustache", "", "phpunit.xml.dist"));
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java
index 476cbc4203..897ae1716c 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java
@@ -91,7 +91,6 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
srcBasePath = ".";
setInvokerPackage("OpenAPI\\Server");
setBundleName("OpenAPIServer");
- packagePath = "SymfonyBundle-php";
modelDirName = "Model";
docsBasePath = "Resources" + File.separator + "docs";
apiDocPath = docsBasePath + File.separator + apiDirName;
@@ -203,7 +202,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
}
public String controllerFileFolder() {
- return (outputFolder + File.separator + toPackagePath(controllerPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(controllerPackage, srcBasePath));
}
@Override
@@ -295,39 +294,39 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
// make test path available in mustache template
additionalProperties.put("testsDirName", testsDirName);
- final String configDir = getPackagePath() + File.separator + "Resources" + File.separator + "config";
- final String dependencyInjectionDir = getPackagePath() + File.separator + "DependencyInjection";
+ final String configDir = "Resources" + File.separator + "config";
+ final String dependencyInjectionDir = "DependencyInjection";
- supportingFiles.add(new SupportingFile("Controller.mustache", toPackagePath(controllerPackage, srcBasePath), "Controller.php"));
- supportingFiles.add(new SupportingFile("Bundle.mustache", getPackagePath(), bundleClassName + ".php"));
+ supportingFiles.add(new SupportingFile("Controller.mustache", toSrcPath(controllerPackage, srcBasePath), "Controller.php"));
+ supportingFiles.add(new SupportingFile("Bundle.mustache", "", bundleClassName + ".php"));
supportingFiles.add(new SupportingFile("Extension.mustache", dependencyInjectionDir, bundleExtensionName + ".php"));
supportingFiles.add(new SupportingFile("ApiPass.mustache", dependencyInjectionDir + File.separator + "Compiler", bundleName + "ApiPass.php"));
- supportingFiles.add(new SupportingFile("ApiServer.mustache", toPackagePath(apiPackage, srcBasePath), "ApiServer.php"));
+ supportingFiles.add(new SupportingFile("ApiServer.mustache", toSrcPath(apiPackage, srcBasePath), "ApiServer.php"));
// Serialization components
- supportingFiles.add(new SupportingFile("serialization/SerializerInterface.mustache", toPackagePath(servicePackage, srcBasePath), "SerializerInterface.php"));
- supportingFiles.add(new SupportingFile("serialization/JmsSerializer.mustache", toPackagePath(servicePackage, srcBasePath), "JmsSerializer.php"));
- supportingFiles.add(new SupportingFile("serialization/StrictJsonDeserializationVisitor.mustache", toPackagePath(servicePackage, srcBasePath), "StrictJsonDeserializationVisitor.php"));
- supportingFiles.add(new SupportingFile("serialization/TypeMismatchException.mustache", toPackagePath(servicePackage, srcBasePath), "TypeMismatchException.php"));
+ supportingFiles.add(new SupportingFile("serialization/SerializerInterface.mustache", toSrcPath(servicePackage, srcBasePath), "SerializerInterface.php"));
+ supportingFiles.add(new SupportingFile("serialization/JmsSerializer.mustache", toSrcPath(servicePackage, srcBasePath), "JmsSerializer.php"));
+ supportingFiles.add(new SupportingFile("serialization/StrictJsonDeserializationVisitor.mustache", toSrcPath(servicePackage, srcBasePath), "StrictJsonDeserializationVisitor.php"));
+ supportingFiles.add(new SupportingFile("serialization/TypeMismatchException.mustache", toSrcPath(servicePackage, srcBasePath), "TypeMismatchException.php"));
// Validation components
- supportingFiles.add(new SupportingFile("validation/ValidatorInterface.mustache", toPackagePath(servicePackage, srcBasePath), "ValidatorInterface.php"));
- supportingFiles.add(new SupportingFile("validation/SymfonyValidator.mustache", toPackagePath(servicePackage, srcBasePath), "SymfonyValidator.php"));
+ supportingFiles.add(new SupportingFile("validation/ValidatorInterface.mustache", toSrcPath(servicePackage, srcBasePath), "ValidatorInterface.php"));
+ supportingFiles.add(new SupportingFile("validation/SymfonyValidator.mustache", toSrcPath(servicePackage, srcBasePath), "SymfonyValidator.php"));
// Testing components
- supportingFiles.add(new SupportingFile("testing/phpunit.xml.mustache", getPackagePath(), "phpunit.xml.dist"));
- supportingFiles.add(new SupportingFile("testing/pom.xml", getPackagePath(), "pom.xml"));
- supportingFiles.add(new SupportingFile("testing/AppKernel.php", toPackagePath(testsPackage, srcBasePath), "AppKernel.php"));
- supportingFiles.add(new SupportingFile("testing/test_config.yml", toPackagePath(testsPackage, srcBasePath), "test_config.yml"));
+ supportingFiles.add(new SupportingFile("testing/phpunit.xml.mustache", "", "phpunit.xml.dist"));
+ supportingFiles.add(new SupportingFile("testing/pom.xml", "", "pom.xml"));
+ supportingFiles.add(new SupportingFile("testing/AppKernel.php", toSrcPath(testsPackage, srcBasePath), "AppKernel.php"));
+ supportingFiles.add(new SupportingFile("testing/test_config.yml", toSrcPath(testsPackage, srcBasePath), "test_config.yml"));
supportingFiles.add(new SupportingFile("routing.mustache", configDir, "routing.yml"));
supportingFiles.add(new SupportingFile("services.mustache", configDir, "services.yml"));
- supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
- supportingFiles.add(new SupportingFile("autoload.mustache", getPackagePath(), "autoload.php"));
- supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));
+ supportingFiles.add(new SupportingFile("composer.mustache", "", "composer.json"));
+ supportingFiles.add(new SupportingFile("autoload.mustache", "", "autoload.php"));
+ supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
- supportingFiles.add(new SupportingFile(".travis.yml", getPackagePath(), ".travis.yml"));
- supportingFiles.add(new SupportingFile(".php_cs", getPackagePath(), ".php_cs"));
- supportingFiles.add(new SupportingFile("git_push.sh.mustache", getPackagePath(), "git_push.sh"));
+ supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
+ supportingFiles.add(new SupportingFile(".php_cs", "", ".php_cs"));
+ supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
// Type-hintable primitive types
// ref: http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration
@@ -461,12 +460,12 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
@Override
public String apiTestFileFolder() {
- return (outputFolder + File.separator + toPackagePath(apiTestsPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(apiTestsPackage, srcBasePath));
}
@Override
public String modelTestFileFolder() {
- return (outputFolder + File.separator + toPackagePath(modelTestsPackage, srcBasePath));
+ return (outputFolder + File.separator + toSrcPath(modelTestsPackage, srcBasePath));
}
public void setComposerVendorName(String composerVendorName) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java
index 5436e16cba..fee2490ff5 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java
@@ -64,7 +64,6 @@ public class PhpZendExpressivePathHandlerServerCodegen extends AbstractPhpCodege
embeddedTemplateDir = templateDir = "ze-ph";
invokerPackage = "App";
- packagePath = "";
srcBasePath = "src" + File.separator + "App";
apiDirName = "Handler";
modelDirName = "DTO";
@@ -76,22 +75,22 @@ public class PhpZendExpressivePathHandlerServerCodegen extends AbstractPhpCodege
apiDocTemplateFiles.clear();
modelDocTemplateFiles.clear();
- supportingFiles.add(new SupportingFile("README.md.mustache", packagePath, "README.md"));
- supportingFiles.add(new SupportingFile("composer.json.mustache", packagePath, "composer.json"));
- supportingFiles.add(new SupportingFile("index.php", packagePath + File.separator + "public", "index.php"));
- supportingFiles.add(new SupportingFile("container.php", packagePath + File.separator + "application", "container.php"));
- supportingFiles.add(new SupportingFile("config.yml", packagePath + File.separator + "application", "config.yml"));
- supportingFiles.add(new SupportingFile("app.yml.mustache", packagePath + File.separator + "application" + File.separator + "config", "app.yml"));
- supportingFiles.add(new SupportingFile("path_handler.yml.mustache", packagePath + File.separator + "application" + File.separator + "config", "path_handler.yml"));
- supportingFiles.add(new SupportingFile("data_transfer.yml.mustache", packagePath + File.separator + "application" + File.separator + "config", "data_transfer.yml"));
- supportingFiles.add(new SupportingFile("ErrorMiddleware.php.mustache", packagePath + File.separator + srcBasePath, "ErrorMiddleware.php"));
- supportingFiles.add(new SupportingFile("Date.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Strategy", "Date.php"));
- supportingFiles.add(new SupportingFile("DateTime.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Strategy", "DateTime.php"));
- supportingFiles.add(new SupportingFile("QueryParameter.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Strategy", "QueryParameter.php"));
- supportingFiles.add(new SupportingFile("QueryParameterArray.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Strategy", "QueryParameterArray.php"));
- supportingFiles.add(new SupportingFile("Type.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Validator", "Type.php"));
- supportingFiles.add(new SupportingFile("QueryParameterType.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Validator", "QueryParameterType.php"));
- supportingFiles.add(new SupportingFile("QueryParameterArrayType.php.mustache", packagePath + File.separator + srcBasePath + File.separator + "Validator", "QueryParameterArrayType.php"));
+ supportingFiles.add(new SupportingFile("README.md.mustache", "", "README.md"));
+ supportingFiles.add(new SupportingFile("composer.json.mustache", "", "composer.json"));
+ supportingFiles.add(new SupportingFile("index.php", "public", "index.php"));
+ supportingFiles.add(new SupportingFile("container.php", "application", "container.php"));
+ supportingFiles.add(new SupportingFile("config.yml", "application", "config.yml"));
+ supportingFiles.add(new SupportingFile("app.yml.mustache", "application" + File.separator + "config", "app.yml"));
+ supportingFiles.add(new SupportingFile("path_handler.yml.mustache", "application" + File.separator + "config", "path_handler.yml"));
+ supportingFiles.add(new SupportingFile("data_transfer.yml.mustache", "application" + File.separator + "config", "data_transfer.yml"));
+ supportingFiles.add(new SupportingFile("ErrorMiddleware.php.mustache", srcBasePath, "ErrorMiddleware.php"));
+ supportingFiles.add(new SupportingFile("Date.php.mustache", srcBasePath + File.separator + "Strategy", "Date.php"));
+ supportingFiles.add(new SupportingFile("DateTime.php.mustache", srcBasePath + File.separator + "Strategy", "DateTime.php"));
+ supportingFiles.add(new SupportingFile("QueryParameter.php.mustache", srcBasePath + File.separator + "Strategy", "QueryParameter.php"));
+ supportingFiles.add(new SupportingFile("QueryParameterArray.php.mustache", srcBasePath + File.separator + "Strategy", "QueryParameterArray.php"));
+ supportingFiles.add(new SupportingFile("Type.php.mustache", srcBasePath + File.separator + "Validator", "Type.php"));
+ supportingFiles.add(new SupportingFile("QueryParameterType.php.mustache", srcBasePath + File.separator + "Validator", "QueryParameterType.php"));
+ supportingFiles.add(new SupportingFile("QueryParameterArrayType.php.mustache", srcBasePath + File.separator + "Validator", "QueryParameterArrayType.php"));
additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, "1.0.0");
}
diff --git a/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache b/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache
index 01e596c97e..59551c7aa7 100644
--- a/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache
@@ -4,6 +4,7 @@ import Date
import Date.Extra exposing (fromIsoString, toFormattedString)
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode
+import Result
type alias DateOnly =
@@ -24,11 +25,8 @@ dateOnlyEncoder model =
decodeIsoString : String -> Decoder DateOnly
decodeIsoString str =
case fromIsoString str of
- Just date ->
+ Result.Ok date ->
Decode.succeed date
- Nothing ->
- Decode.fail <|
- "Cannot convert "
- ++ str
- ++ " to DateOnly"
+ Result.Err msg ->
+ Decode.fail msg
diff --git a/modules/openapi-generator/src/main/resources/elm/DateTime.mustache b/modules/openapi-generator/src/main/resources/elm/DateTime.mustache
index e976d4aeee..d3638500a8 100644
--- a/modules/openapi-generator/src/main/resources/elm/DateTime.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/DateTime.mustache
@@ -4,6 +4,7 @@ import Date
import Date.Extra exposing (fromIsoString, toIsoString)
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode
+import Result
type alias DateTime =
@@ -24,11 +25,8 @@ dateTimeEncoder model =
decodeIsoString : String -> Decoder DateTime
decodeIsoString str =
case fromIsoString str of
- Just date ->
+ Result.Ok date ->
Decode.succeed date
- Nothing ->
- Decode.fail <|
- "Cannot convert "
- ++ str
- ++ " to DateTime"
+ Result.Err msg ->
+ Decode.fail msg
diff --git a/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache b/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache
index 9d98b5a1d0..8a37eef108 100644
--- a/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache
@@ -1,5 +1,7 @@
{{classVarName}}Decoder : Decoder {{classname}}
{{classVarName}}Decoder =
decode {{classname}}
-{{#allVars}}{{^discriminatorValue}} |> {{>fieldDecoder}}
-{{/discriminatorValue}}{{/allVars}}
\ No newline at end of file
+{{#allVars}}
+{{^discriminatorValue}} |> {{>fieldDecoder}}
+{{/discriminatorValue}}
+{{/allVars}}
diff --git a/modules/openapi-generator/src/main/resources/elm/api.mustache b/modules/openapi-generator/src/main/resources/elm/api.mustache
index 00e26f284a..df085dfa43 100644
--- a/modules/openapi-generator/src/main/resources/elm/api.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/api.mustache
@@ -10,13 +10,14 @@ import Json.Decode as Decode
basePath : String
basePath =
"{{basePath}}"
-
-
{{#operations}}
{{#operation}}
-{-
- {{notes}}
+
+
+{{#notes}}
+{-| {{{notes}}}
-}
+{{/notes}}
{{operationId}} : {{#pathParams}}{{dataType}} -> {{/pathParams}}{{#bodyParam}}{{dataType}} -> {{/bodyParam}}Http.Request {{^responses}}(){{/responses}}{{#responses}}{{#-first}}{{^dataType}}(){{/dataType}}{{#isMapContainer}}(Dict.Dict String {{/isMapContainer}}{{#isListContainer}}(List {{/isListContainer}}{{dataType}}{{#isListContainer}}){{/isListContainer}}{{#isMapContainer}}){{/isMapContainer}}{{/-first}}{{/responses}}
{{operationId}} {{#pathParams}}{{paramName}} {{/pathParams}}{{#bodyParam}}model {{/bodyParam}}=
{ method = "{{httpMethod}}"
@@ -28,7 +29,5 @@ basePath =
, withCredentials = False
}
|> Http.request
-
-
{{/operation}}
{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/elm/elm-package.mustache b/modules/openapi-generator/src/main/resources/elm/elm-package.mustache
index 3a60279d7d..6cc67985f7 100644
--- a/modules/openapi-generator/src/main/resources/elm/elm-package.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/elm-package.mustache
@@ -12,7 +12,7 @@
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/http": "1.0.0 <= v < 2.0.0",
- "justinmimbs/elm-date-extra": "2.0.3 <= v < 3.0.0"
+ "justinmimbs/elm-date-extra": "3.0.0 <= v < 4.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
diff --git a/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache
index ab4d7b671f..c65ebe4189 100644
--- a/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache
@@ -2,8 +2,12 @@
{{{appName}}}
{{{appDescription}}}
- {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
- {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
+ {{#version}}
+ OpenAPI spec version: {{{version}}}
+ {{/version}}
+ {{#infoEmail}}
+ Contact: {{{infoEmail}}}
+ {{/infoEmail}}
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
diff --git a/modules/openapi-generator/src/main/resources/elm/model.mustache b/modules/openapi-generator/src/main/resources/elm/model.mustache
index fa5418a8ee..5a0f072260 100644
--- a/modules/openapi-generator/src/main/resources/elm/model.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/model.mustache
@@ -6,19 +6,14 @@ module Data.{{classname}} exposing ({{#models}}{{#model}}{{classname}}{{#hasChil
import Json.Decode.Pipeline exposing (decode, optional, required)
import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-
-
{{#models}}
{{#model}}
+
+
{{#description}}
-{-
- {{{description}}}
+{-| {{{description}}}
-}
{{/description}}
{{#isEnum}}{{>modelTypeUnion}}{{/isEnum}}{{^isEnum}}{{#hasChildren}}{{>modelTypeDiscriminator}}{{/hasChildren}}{{^hasChildren}}{{#isAlias}}{{>modelTypePrimitive}}{{/isAlias}}{{^isAlias}}{{#isArrayModel}}{{>modelTypeArray}}{{/isArrayModel}}{{^isArrayModel}}{{>modelTypeAlias}}{{/isArrayModel}}{{/isAlias}}{{/hasChildren}}{{/isEnum}}
{{/model}}
-{{^-last}}
-
-
-{{/-last}}
{{/models}}
diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache
index 5c92a9f49e..fc796b4c23 100644
--- a/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache
@@ -1,7 +1,5 @@
-
-
type alias {{classname}} =
- { {{#vars}}{{^-first}} , {{/-first}}{{name}} : {{^required}}Maybe {{/required}}{{#isContainer}}(List {{/isContainer}}{{#isEnum}}{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isContainer}}){{/isContainer}}
+ { {{#vars}}{{^-first}} , {{/-first}}{{name}} : {{^required}}Maybe {{#isContainer}}({{/isContainer}}{{/required}}{{#isContainer}}List {{/isContainer}}{{#isEnum}}{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{dataType}}{{/isEnum}}{{^required}}{{#isContainer}}){{/isContainer}}{{/required}}
{{/vars}} }
{{#vars}}
{{#isEnum}}
@@ -25,4 +23,4 @@ type alias {{classname}} =
{{>unionEncoder}}
{{/isEnum}}
-{{/vars}}
\ No newline at end of file
+{{/vars}}
diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache
index 20ca2bbb89..a1d872f145 100644
--- a/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache
+++ b/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache
@@ -1,5 +1,3 @@
-
-
type alias {{classname}}
= {{dataType}}
@@ -11,4 +9,4 @@ type alias {{classname}}
{{classVarName}}Encoder : {{classname}} -> Encode.Value
{{classVarName}}Encoder =
- {{vendorExtensions.x-encoder}}
\ No newline at end of file
+ {{vendorExtensions.x-encoder}}
diff --git a/modules/openapi-generator/src/main/resources/php/README.mustache b/modules/openapi-generator/src/main/resources/php/README.mustache
index 459e6f4347..4771537651 100644
--- a/modules/openapi-generator/src/main/resources/php/README.mustache
+++ b/modules/openapi-generator/src/main/resources/php/README.mustache
@@ -1,4 +1,4 @@
-# {{packagePath}}
+# {{packageName}}
{{#appDescription}}
{{{appDescription}}}
{{/appDescription}}
@@ -47,7 +47,7 @@ Then run `composer install`
Download the files and include `autoload.php`:
```php
- require_once('/path/to/{{packagePath}}/vendor/autoload.php');
+ require_once('/path/to/{{packageName}}/vendor/autoload.php');
```
## Tests
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/lumen/PhpLumenServerOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/lumen/PhpLumenServerOptionsTest.java
index 3e00efa36b..7028ec5db3 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/lumen/PhpLumenServerOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/lumen/PhpLumenServerOptionsTest.java
@@ -53,7 +53,7 @@ public class PhpLumenServerOptionsTest extends AbstractOptionsTest {
times = 1;
clientCodegen.setInvokerPackage(PhpLumenServerOptionsProvider.INVOKER_PACKAGE_VALUE);
times = 1;
- clientCodegen.setPackagePath(PhpLumenServerOptionsProvider.PACKAGE_PATH_VALUE);
+ clientCodegen.setPackageName(PhpLumenServerOptionsProvider.PACKAGE_NAME_VALUE);
times = 1;
clientCodegen.setSrcBasePath(PhpLumenServerOptionsProvider.SRC_BASE_PATH_VALUE);
times = 1;
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java
index c5ae05d05f..416b02704e 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java
@@ -31,7 +31,7 @@ public class PhpClientOptionsProvider implements OptionsProvider {
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String VARIABLE_NAMING_CONVENTION_VALUE = "snake_case";
public static final String INVOKER_PACKAGE_VALUE = "OpenAPITools\\Client\\Php";
- public static final String PACKAGE_PATH_VALUE = "OpenAPIToolsClient-php";
+ public static final String PACKAGE_NAME_VALUE = "OpenAPIToolsClient-php";
public static final String SRC_BASE_PATH_VALUE = "libPhp";
public static final String COMPOSER_VENDOR_NAME_VALUE = "openAPIToolsPhp";
public static final String COMPOSER_PROJECT_NAME_VALUE = "openapi-tools-client-php";
@@ -55,7 +55,7 @@ public class PhpClientOptionsProvider implements OptionsProvider {
.put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE)
.put(PhpClientCodegen.VARIABLE_NAMING_CONVENTION, VARIABLE_NAMING_CONVENTION_VALUE)
.put(CodegenConstants.INVOKER_PACKAGE, INVOKER_PACKAGE_VALUE)
- .put(PhpClientCodegen.PACKAGE_PATH, PACKAGE_PATH_VALUE)
+ .put(PhpClientCodegen.PACKAGE_NAME, PACKAGE_NAME_VALUE)
.put(PhpClientCodegen.SRC_BASE_PATH, SRC_BASE_PATH_VALUE)
.put(PhpClientCodegen.COMPOSER_VENDOR_NAME, COMPOSER_VENDOR_NAME_VALUE)
.put(CodegenConstants.GIT_USER_ID, GIT_USER_ID_VALUE)
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java
index f6f29bf041..233c290573 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java
@@ -31,7 +31,7 @@ public class PhpLumenServerOptionsProvider implements OptionsProvider {
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
public static final String VARIABLE_NAMING_CONVENTION_VALUE = "snake_case";
public static final String INVOKER_PACKAGE_VALUE = "lumen";
- public static final String PACKAGE_PATH_VALUE = "php";
+ public static final String PACKAGE_NAME_VALUE = "php";
public static final String SRC_BASE_PATH_VALUE = "libPhp";
public static final String GIT_USER_ID_VALUE = "gitOpenAPIToolsPhp";
public static final String GIT_REPO_ID_VALUE = "git-openapi-tools-php";
@@ -49,7 +49,7 @@ public class PhpLumenServerOptionsProvider implements OptionsProvider {
ImmutableMap.Builder builder = new ImmutableMap.Builder();
return builder.put(CodegenConstants.MODEL_PACKAGE, MODEL_PACKAGE_VALUE)
.put(AbstractPhpCodegen.VARIABLE_NAMING_CONVENTION, VARIABLE_NAMING_CONVENTION_VALUE)
- .put(AbstractPhpCodegen.PACKAGE_PATH, PACKAGE_PATH_VALUE)
+ .put(AbstractPhpCodegen.PACKAGE_NAME, PACKAGE_NAME_VALUE)
.put(AbstractPhpCodegen.SRC_BASE_PATH, SRC_BASE_PATH_VALUE)
.put(CodegenConstants.API_PACKAGE, API_PACKAGE_VALUE)
.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE)
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java
index 8df3c50075..c170e2ff57 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java
@@ -29,7 +29,7 @@ public class PhpSlimServerOptionsProvider implements OptionsProvider {
public static final String API_PACKAGE_VALUE = "apiPackage";
public static final String VARIABLE_NAMING_CONVENTION_VALUE = "camelCase";
public static final String INVOKER_PACKAGE_VALUE = "OpenAPIServer";
- public static final String PACKAGE_PATH_VALUE = "";
+ public static final String PACKAGE_NAME_VALUE = "";
public static final String SRC_BASE_PATH_VALUE = "src";
public static final String GIT_USER_ID_VALUE = "gitOpenAPIToolsPhp";
public static final String GIT_REPO_ID_VALUE = "git-openapi-tools-php";
@@ -49,7 +49,7 @@ public class PhpSlimServerOptionsProvider implements OptionsProvider {
ImmutableMap.Builder builder = new ImmutableMap.Builder();
return builder.put(CodegenConstants.MODEL_PACKAGE, MODEL_PACKAGE_VALUE)
.put(AbstractPhpCodegen.VARIABLE_NAMING_CONVENTION, VARIABLE_NAMING_CONVENTION_VALUE)
- .put(AbstractPhpCodegen.PACKAGE_PATH, PACKAGE_PATH_VALUE)
+ .put(AbstractPhpCodegen.PACKAGE_NAME, PACKAGE_NAME_VALUE)
.put(AbstractPhpCodegen.SRC_BASE_PATH, SRC_BASE_PATH_VALUE)
.put(CodegenConstants.API_PACKAGE, API_PACKAGE_VALUE)
.put(CodegenConstants.INVOKER_PACKAGE, INVOKER_PACKAGE_VALUE)
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpClientOptionsTest.java
index 1f82e7bdf8..fa4a8a2af1 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpClientOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpClientOptionsTest.java
@@ -53,7 +53,7 @@ public class PhpClientOptionsTest extends AbstractOptionsTest {
times = 1;
clientCodegen.setInvokerPackage(PhpClientOptionsProvider.INVOKER_PACKAGE_VALUE);
times = 1;
- clientCodegen.setPackagePath(PhpClientOptionsProvider.PACKAGE_PATH_VALUE);
+ clientCodegen.setPackageName(PhpClientOptionsProvider.PACKAGE_NAME_VALUE);
times = 1;
clientCodegen.setSrcBasePath(PhpClientOptionsProvider.SRC_BASE_PATH_VALUE);
times = 1;
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim/PhpSlimServerOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim/PhpSlimServerOptionsTest.java
index c21aaf3c6f..25cd43077a 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim/PhpSlimServerOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/slim/PhpSlimServerOptionsTest.java
@@ -51,7 +51,7 @@ public class PhpSlimServerOptionsTest extends AbstractOptionsTest {
times = 1;
clientCodegen.setInvokerPackage(PhpSlimServerOptionsProvider.INVOKER_PACKAGE_VALUE);
times = 1;
- clientCodegen.setPackagePath(PhpSlimServerOptionsProvider.PACKAGE_PATH_VALUE);
+ clientCodegen.setPackageName(PhpSlimServerOptionsProvider.PACKAGE_NAME_VALUE);
times = 1;
clientCodegen.setSrcBasePath(PhpSlimServerOptionsProvider.SRC_BASE_PATH_VALUE);
times = 1;
diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml
index 49fd4d18dc..e63cb90e0a 100644
--- a/modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml
+++ b/modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml
@@ -25,7 +25,7 @@ paths:
tags:
- fake
summary: To test code injection */ ' " =end -- \r\n \n \r
- descriptions: To test code injection */ ' " =end -- \r\n \n \r
+ description: To test code injection */ ' " =end -- \r\n \n \r
operationId: testCodeInject */ ' " =end -- \r\n \n \r
consumes:
- application/json
diff --git a/pom.xml b/pom.xml
index 13ddbd76f6..6b04740985 100644
--- a/pom.xml
+++ b/pom.xml
@@ -982,6 +982,7 @@
samples/server/petstore/spring-mvc
samples/server/petstore/spring-mvc-j8-async
samples/server/petstore/spring-mvc-j8-localdatetime
+ samples/server/petstore/php-slim
diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION
index 096bf47efe..4395ff5923 100644
--- a/samples/client/petstore/elm/.openapi-generator/VERSION
+++ b/samples/client/petstore/elm/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.0-SNAPSHOT
\ No newline at end of file
+3.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/elm/elm-package.json b/samples/client/petstore/elm/elm-package.json
index 3a60279d7d..6cc67985f7 100644
--- a/samples/client/petstore/elm/elm-package.json
+++ b/samples/client/petstore/elm/elm-package.json
@@ -12,7 +12,7 @@
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"elm-lang/http": "1.0.0 <= v < 2.0.0",
- "justinmimbs/elm-date-extra": "2.0.3 <= v < 3.0.0"
+ "justinmimbs/elm-date-extra": "3.0.0 <= v < 4.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
diff --git a/samples/client/petstore/elm/src/Data/ApiResponse.elm b/samples/client/petstore/elm/src/Data/ApiResponse.elm
index bb11506e43..ce05291754 100644
--- a/samples/client/petstore/elm/src/Data/ApiResponse.elm
+++ b/samples/client/petstore/elm/src/Data/ApiResponse.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -19,11 +18,8 @@ import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-{-
- Describes the result of uploading an image resource
+{-| Describes the result of uploading an image resource
-}
-
-
type alias ApiResponse =
{ code : Maybe Int
, type_ : Maybe String
diff --git a/samples/client/petstore/elm/src/Data/Category.elm b/samples/client/petstore/elm/src/Data/Category.elm
index 2a09dad327..8cac70ea45 100644
--- a/samples/client/petstore/elm/src/Data/Category.elm
+++ b/samples/client/petstore/elm/src/Data/Category.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -19,11 +18,8 @@ import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-{-
- A category for a pet
+{-| A category for a pet
-}
-
-
type alias Category =
{ id : Maybe Int
, name : Maybe String
diff --git a/samples/client/petstore/elm/src/Data/Order_.elm b/samples/client/petstore/elm/src/Data/Order_.elm
index d6e02d6894..c343084f39 100644
--- a/samples/client/petstore/elm/src/Data/Order_.elm
+++ b/samples/client/petstore/elm/src/Data/Order_.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -20,11 +19,8 @@ import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-{-
- An order for a pets from the pet store
+{-| An order for a pets from the pet store
-}
-
-
type alias Order_ =
{ id : Maybe Int
, petId : Maybe Int
diff --git a/samples/client/petstore/elm/src/Data/Pet.elm b/samples/client/petstore/elm/src/Data/Pet.elm
index 9f87dfa03a..7f15ea4416 100644
--- a/samples/client/petstore/elm/src/Data/Pet.elm
+++ b/samples/client/petstore/elm/src/Data/Pet.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -21,16 +20,13 @@ import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-{-
- A pet for sale in the pet store
+{-| A pet for sale in the pet store
-}
-
-
type alias Pet =
{ id : Maybe Int
, category : Maybe Category
, name : String
- , photoUrls : (List String)
+ , photoUrls : List String
, tags : Maybe (List Tag)
, status : Maybe Status
}
diff --git a/samples/client/petstore/elm/src/Data/Tag.elm b/samples/client/petstore/elm/src/Data/Tag.elm
index 1eb09ddcc4..74f6de1828 100644
--- a/samples/client/petstore/elm/src/Data/Tag.elm
+++ b/samples/client/petstore/elm/src/Data/Tag.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -19,11 +18,8 @@ import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-{-
- A tag for a pet
+{-| A tag for a pet
-}
-
-
type alias Tag =
{ id : Maybe Int
, name : Maybe String
diff --git a/samples/client/petstore/elm/src/Data/User.elm b/samples/client/petstore/elm/src/Data/User.elm
index b7debad3d5..851f3a5102 100644
--- a/samples/client/petstore/elm/src/Data/User.elm
+++ b/samples/client/petstore/elm/src/Data/User.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -19,11 +18,8 @@ import Json.Encode as Encode
import Maybe exposing (map, withDefault)
-{-
- A User who is purchasing from the pet store
+{-| A User who is purchasing from the pet store
-}
-
-
type alias User =
{ id : Maybe Int
, username : Maybe String
diff --git a/samples/client/petstore/elm/src/DateOnly.elm b/samples/client/petstore/elm/src/DateOnly.elm
index 01e596c97e..59551c7aa7 100644
--- a/samples/client/petstore/elm/src/DateOnly.elm
+++ b/samples/client/petstore/elm/src/DateOnly.elm
@@ -4,6 +4,7 @@ import Date
import Date.Extra exposing (fromIsoString, toFormattedString)
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode
+import Result
type alias DateOnly =
@@ -24,11 +25,8 @@ dateOnlyEncoder model =
decodeIsoString : String -> Decoder DateOnly
decodeIsoString str =
case fromIsoString str of
- Just date ->
+ Result.Ok date ->
Decode.succeed date
- Nothing ->
- Decode.fail <|
- "Cannot convert "
- ++ str
- ++ " to DateOnly"
+ Result.Err msg ->
+ Decode.fail msg
diff --git a/samples/client/petstore/elm/src/DateTime.elm b/samples/client/petstore/elm/src/DateTime.elm
index e976d4aeee..d3638500a8 100644
--- a/samples/client/petstore/elm/src/DateTime.elm
+++ b/samples/client/petstore/elm/src/DateTime.elm
@@ -4,6 +4,7 @@ import Date
import Date.Extra exposing (fromIsoString, toIsoString)
import Json.Decode as Decode exposing (Decoder)
import Json.Encode as Encode
+import Result
type alias DateTime =
@@ -24,11 +25,8 @@ dateTimeEncoder model =
decodeIsoString : String -> Decoder DateTime
decodeIsoString str =
case fromIsoString str of
- Just date ->
+ Result.Ok date ->
Decode.succeed date
- Nothing ->
- Decode.fail <|
- "Cannot convert "
- ++ str
- ++ " to DateTime"
+ Result.Err msg ->
+ Decode.fail msg
diff --git a/samples/client/petstore/elm/src/Request/Pet.elm b/samples/client/petstore/elm/src/Request/Pet.elm
index 9d4303057f..0a4b5c1769 100644
--- a/samples/client/petstore/elm/src/Request/Pet.elm
+++ b/samples/client/petstore/elm/src/Request/Pet.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -25,9 +24,6 @@ basePath =
"http://petstore.swagger.io/v2"
-{-
-
--}
addPet : Pet -> Http.Request ()
addPet model =
{ method = "POST"
@@ -41,9 +37,6 @@ addPet model =
|> Http.request
-{-
-
--}
deletePet : Int -> Http.Request ()
deletePet petId =
{ method = "DELETE"
@@ -57,8 +50,7 @@ deletePet petId =
|> Http.request
-{-
- Multiple status values can be provided with comma separated strings
+{-| Multiple status values can be provided with comma separated strings
-}
findPetsByStatus : Http.Request (List Pet)
findPetsByStatus =
@@ -73,8 +65,7 @@ findPetsByStatus =
|> Http.request
-{-
- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+{-| Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
-}
findPetsByTags : Http.Request (List Pet)
findPetsByTags =
@@ -89,8 +80,7 @@ findPetsByTags =
|> Http.request
-{-
- Returns a single pet
+{-| Returns a single pet
-}
getPetById : Int -> Http.Request Pet
getPetById petId =
@@ -105,9 +95,6 @@ getPetById petId =
|> Http.request
-{-
-
--}
updatePet : Pet -> Http.Request ()
updatePet model =
{ method = "PUT"
@@ -121,9 +108,6 @@ updatePet model =
|> Http.request
-{-
-
--}
updatePetWithForm : Int -> Http.Request ()
updatePetWithForm petId =
{ method = "POST"
@@ -137,9 +121,6 @@ updatePetWithForm petId =
|> Http.request
-{-
-
--}
uploadFile : Int -> Http.Request ApiResponse
uploadFile petId =
{ method = "POST"
@@ -151,5 +132,3 @@ uploadFile petId =
, withCredentials = False
}
|> Http.request
-
-
diff --git a/samples/client/petstore/elm/src/Request/Store.elm b/samples/client/petstore/elm/src/Request/Store.elm
index f6048f45f8..2e98105a2f 100644
--- a/samples/client/petstore/elm/src/Request/Store.elm
+++ b/samples/client/petstore/elm/src/Request/Store.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -24,8 +23,7 @@ basePath =
"http://petstore.swagger.io/v2"
-{-
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+{-| For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-}
deleteOrder : String -> Http.Request ()
deleteOrder orderId =
@@ -40,8 +38,7 @@ deleteOrder orderId =
|> Http.request
-{-
- Returns a map of status codes to quantities
+{-| Returns a map of status codes to quantities
-}
getInventory : Http.Request (Dict.Dict String Int)
getInventory =
@@ -56,8 +53,7 @@ getInventory =
|> Http.request
-{-
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+{-| For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
-}
getOrderById : Int -> Http.Request Order_
getOrderById orderId =
@@ -72,9 +68,6 @@ getOrderById orderId =
|> Http.request
-{-
-
--}
placeOrder : Order_ -> Http.Request Order_
placeOrder model =
{ method = "POST"
@@ -86,5 +79,3 @@ placeOrder model =
, withCredentials = False
}
|> Http.request
-
-
diff --git a/samples/client/petstore/elm/src/Request/User.elm b/samples/client/petstore/elm/src/Request/User.elm
index e35df86fad..e6bbbb32ed 100644
--- a/samples/client/petstore/elm/src/Request/User.elm
+++ b/samples/client/petstore/elm/src/Request/User.elm
@@ -3,7 +3,6 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
OpenAPI spec version: 1.0.0
-
NOTE: This file is auto generated by the openapi-generator.
https://github.com/openapitools/openapi-generator.git
@@ -24,8 +23,7 @@ basePath =
"http://petstore.swagger.io/v2"
-{-
- This can only be done by the logged in user.
+{-| This can only be done by the logged in user.
-}
createUser : User -> Http.Request ()
createUser model =
@@ -40,9 +38,6 @@ createUser model =
|> Http.request
-{-
-
--}
createUsersWithArrayInput : User -> Http.Request ()
createUsersWithArrayInput model =
{ method = "POST"
@@ -56,9 +51,6 @@ createUsersWithArrayInput model =
|> Http.request
-{-
-
--}
createUsersWithListInput : User -> Http.Request ()
createUsersWithListInput model =
{ method = "POST"
@@ -72,8 +64,7 @@ createUsersWithListInput model =
|> Http.request
-{-
- This can only be done by the logged in user.
+{-| This can only be done by the logged in user.
-}
deleteUser : String -> Http.Request ()
deleteUser username =
@@ -88,9 +79,6 @@ deleteUser username =
|> Http.request
-{-
-
--}
getUserByName : String -> Http.Request User
getUserByName username =
{ method = "GET"
@@ -104,9 +92,6 @@ getUserByName username =
|> Http.request
-{-
-
--}
loginUser : Http.Request String
loginUser =
{ method = "GET"
@@ -120,9 +105,6 @@ loginUser =
|> Http.request
-{-
-
--}
logoutUser : Http.Request ()
logoutUser =
{ method = "GET"
@@ -136,8 +118,7 @@ logoutUser =
|> Http.request
-{-
- This can only be done by the logged in user.
+{-| This can only be done by the logged in user.
-}
updateUser : String -> User -> Http.Request ()
updateUser username model =
@@ -150,5 +131,3 @@ updateUser username model =
, withCredentials = False
}
|> Http.request
-
-
diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
index dde25ef08e..afa6365606 100644
--- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
@@ -1 +1 @@
-3.1.1-SNAPSHOT
\ No newline at end of file
+4.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/haskell-http-client/Makefile b/samples/client/petstore/haskell-http-client/Makefile
index f805764194..4f3b3b67e6 100644
--- a/samples/client/petstore/haskell-http-client/Makefile
+++ b/samples/client/petstore/haskell-http-client/Makefile
@@ -7,4 +7,4 @@ test: ; ($(STACKCMD) test --fast);
build-example: build ; (cd ./example-app; $(STACKCMD) build --fast);
# a test-only project may exit with ExitFailure, despite building successfully
build-integration: build ; (cd ./tests-integration; $(STACKCMD) build --no-run-tests --fast);
-test-integration: build-integration ; (cd ./tests-integration; $(STACKCMD) test --fast);
+test-integration: build-integration ; (cd ./tests-integration; $(STACKCMD) test --fast);
diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-AnotherFake.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-AnotherFake.html
index 323960013b..af01de5119 100644
--- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-AnotherFake.html
+++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-AnotherFake.html
@@ -1,4 +1,4 @@
OpenAPIPetstore.API.AnotherFakeOperations
AnotherFake
testSpecialTags
\ No newline at end of file
+Operations
AnotherFake
op123testSpecialTags