forked from loafle/openapi-generator-original
Add Elm script with Petstore OAS3 (#293)
* add elm script with petstore oas3 * change default value for elm generator * update default value for elm templates * fix typo
This commit is contained in:
parent
4ce97b6f4e
commit
95e04f91db
32
bin/openapi3/elm-petstore.sh
Executable file
32
bin/openapi3/elm-petstore.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
echo "# START SCRIPT: $SCRIPT"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
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/3_0/petstore.yaml -l elm -o samples/client/petstore/elm $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -48,7 +48,7 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
private Set<String> customPrimitives = new HashSet<String>();
|
private Set<String> customPrimitives = new HashSet<String>();
|
||||||
|
|
||||||
protected String packageName = "swagger";
|
protected String packageName = "openapi";
|
||||||
protected String packageVersion = "1.0.0";
|
protected String packageVersion = "1.0.0";
|
||||||
|
|
||||||
public CodegenType getTag() {
|
public CodegenType getTag() {
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
{{#appDescription}}
|
{{#appDescription}}
|
||||||
{{{appDescription}}}
|
{{{appDescription}}}
|
||||||
{{/appDescription}}
|
|
||||||
|
|
||||||
|
{{/appDescription}}
|
||||||
## Overview
|
## Overview
|
||||||
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.
|
This API client was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
- API version: {{appVersion}}
|
- API version: {{appVersion}}
|
||||||
- Package version: {{packageVersion}}
|
- Package version: {{packageVersion}}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
{{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||||
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.
|
This API client was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version:
|
- Package version:
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
OpenAPI spec version: 1.0.0
|
OpenAPI spec version: 1.0.0
|
||||||
Contact: apiteam@swagger.io
|
Contact: apiteam@swagger.io
|
||||||
|
|
||||||
NOTE: This file is auto generated by the swagger code generator program.
|
NOTE: This file is auto generated by the openapi-generator.
|
||||||
https://github.com/swagger-api/swagger-codegen.git
|
https://github.com/openapitools/openapi-generator.git
|
||||||
Do not edit this file manually.
|
Do not edit this file manually.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user