update elixir with oas3 petstore (#318)

This commit is contained in:
William Cheng 2018-05-04 23:52:52 +08:00 committed by GitHub
parent bee7aebe4b
commit 0b6a59fa09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 119 additions and 82 deletions

37
bin/openapi3/elixir-petstore.sh Executable file
View File

@ -0,0 +1,37 @@
#!/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
# remove existing lib and model file
echo "removing existing lib, model files"
rm -Rf "samples/client/petstore/elixir/lib/swagger_petstore/model/"
rm -Rf "samples/client/petstore/elixir/lib/swagger_petstore/lib/"
# 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"
args="generate -t modules/openapi-generator/src/main/resources/elixir -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l elixir -o samples/client/petstore/elixir/ $@"
java $JAVA_OPTS -jar $executable $args

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.AnotherFake do defmodule SwaggerPetstore.Api.AnotherFake do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.Fake do defmodule SwaggerPetstore.Api.Fake do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.FakeClassnameTags123 do defmodule SwaggerPetstore.Api.FakeClassnameTags123 do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.Pet do defmodule SwaggerPetstore.Api.Pet do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.Store do defmodule SwaggerPetstore.Api.Store do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.User do defmodule SwaggerPetstore.Api.User do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Connection do defmodule SwaggerPetstore.Connection do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Deserializer do defmodule SwaggerPetstore.Deserializer do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.AdditionalPropertiesClass do defmodule SwaggerPetstore.Model.AdditionalPropertiesClass do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Animal do defmodule SwaggerPetstore.Model.Animal do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.AnimalFarm do defmodule SwaggerPetstore.Model.AnimalFarm do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ApiResponse do defmodule SwaggerPetstore.Model.ApiResponse do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do defmodule SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ArrayOfNumberOnly do defmodule SwaggerPetstore.Model.ArrayOfNumberOnly do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ArrayTest do defmodule SwaggerPetstore.Model.ArrayTest do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Capitalization do defmodule SwaggerPetstore.Model.Capitalization do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Cat do defmodule SwaggerPetstore.Model.Cat do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Category do defmodule SwaggerPetstore.Model.Category do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ClassModel do defmodule SwaggerPetstore.Model.ClassModel do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Client do defmodule SwaggerPetstore.Model.Client do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Dog do defmodule SwaggerPetstore.Model.Dog do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.EnumArrays do defmodule SwaggerPetstore.Model.EnumArrays do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.EnumClass do defmodule SwaggerPetstore.Model.EnumClass do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.EnumTest do defmodule SwaggerPetstore.Model.EnumTest do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.FormatTest do defmodule SwaggerPetstore.Model.FormatTest do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.HasOnlyReadOnly do defmodule SwaggerPetstore.Model.HasOnlyReadOnly do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.MapTest do defmodule SwaggerPetstore.Model.MapTest do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do defmodule SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Model200Response do defmodule SwaggerPetstore.Model.Model200Response do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Name do defmodule SwaggerPetstore.Model.Name do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.NumberOnly do defmodule SwaggerPetstore.Model.NumberOnly do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Order do defmodule SwaggerPetstore.Model.Order do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.OuterComposite do defmodule SwaggerPetstore.Model.OuterComposite do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.OuterEnum do defmodule SwaggerPetstore.Model.OuterEnum do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Pet do defmodule SwaggerPetstore.Model.Pet do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ReadOnlyFirst do defmodule SwaggerPetstore.Model.ReadOnlyFirst do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Return do defmodule SwaggerPetstore.Model.Return do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.SpecialModelName do defmodule SwaggerPetstore.Model.SpecialModelName do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Tag do defmodule SwaggerPetstore.Model.Tag do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.User do defmodule SwaggerPetstore.Model.User do

View File

@ -1,5 +1,5 @@
# NOTE: This class is auto generated by the swagger code generator program. # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://github.com/swagger-api/swagger-codegen.git # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.RequestBuilder do defmodule SwaggerPetstore.RequestBuilder do