From 6ce2b2e9efd013a25f8da0bcf7196fe60230c19d Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:35:03 +0900 Subject: [PATCH 01/13] Rename templateDir: rails5 -> ruby-on-rails-server --- bin/rails5-petstore-server.sh | 2 +- .../codegen/languages/RubyOnRailsServerCodegen.java | 2 +- .../src/main/resources/{rails5 => ruby-on-rails-server}/.keep | 0 .../main/resources/{rails5 => ruby-on-rails-server}/404.html | 0 .../main/resources/{rails5 => ruby-on-rails-server}/422.html | 0 .../main/resources/{rails5 => ruby-on-rails-server}/500.html | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/Gemfile | 0 .../main/resources/{rails5 => ruby-on-rails-server}/README.md | 0 .../main/resources/{rails5 => ruby-on-rails-server}/Rakefile | 0 .../active_record_belongs_to_required_by_default.rb | 0 .../apple-touch-icon-precomposed.png | 0 .../{rails5 => ruby-on-rails-server}/apple-touch-icon.png | 0 .../resources/{rails5 => ruby-on-rails-server}/application.rb | 0 .../{rails5 => ruby-on-rails-server}/application_controller.rb | 0 .../application_controller_renderer.rb | 0 .../{rails5 => ruby-on-rails-server}/application_job.rb | 0 .../{rails5 => ruby-on-rails-server}/application_mailer.rb | 0 .../{rails5 => ruby-on-rails-server}/application_record.rb | 0 .../{rails5 => ruby-on-rails-server}/backtrace_silencers.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/boot.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/bundle | 0 .../main/resources/{rails5 => ruby-on-rails-server}/cable.yml | 0 .../{rails5 => ruby-on-rails-server}/callback_terminator.rb | 0 .../main/resources/{rails5 => ruby-on-rails-server}/channel.rb | 0 .../main/resources/{rails5 => ruby-on-rails-server}/config.ru | 0 .../resources/{rails5 => ruby-on-rails-server}/connection.rb | 0 .../{rails5 => ruby-on-rails-server}/controller.mustache | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/cors.rb | 0 .../resources/{rails5 => ruby-on-rails-server}/database.yml | 0 .../resources/{rails5 => ruby-on-rails-server}/development.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/en.yml | 0 .../resources/{rails5 => ruby-on-rails-server}/environment.rb | 0 .../main/resources/{rails5 => ruby-on-rails-server}/favicon.ico | 0 .../filter_parameter_logging.rb | 0 .../resources/{rails5 => ruby-on-rails-server}/inflections.rb | 0 .../resources/{rails5 => ruby-on-rails-server}/info.mustache | 0 .../resources/{rails5 => ruby-on-rails-server}/mailer.html.erb | 0 .../resources/{rails5 => ruby-on-rails-server}/mailer.text.erb | 0 .../resources/{rails5 => ruby-on-rails-server}/migrate.mustache | 0 .../resources/{rails5 => ruby-on-rails-server}/mime_types.rb | 0 .../resources/{rails5 => ruby-on-rails-server}/model.mustache | 0 .../resources/{rails5 => ruby-on-rails-server}/production.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/puma.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/rails | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/rake | 0 .../main/resources/{rails5 => ruby-on-rails-server}/restart.txt | 0 .../main/resources/{rails5 => ruby-on-rails-server}/robots.txt | 0 .../resources/{rails5 => ruby-on-rails-server}/routes.mustache | 0 .../main/resources/{rails5 => ruby-on-rails-server}/schema.rb | 0 .../main/resources/{rails5 => ruby-on-rails-server}/secrets.yml | 0 .../main/resources/{rails5 => ruby-on-rails-server}/seeds.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/setup | 0 .../main/resources/{rails5 => ruby-on-rails-server}/spring.rb | 0 .../resources/{rails5 => ruby-on-rails-server}/ssl_options.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/test.rb | 0 .../resources/{rails5 => ruby-on-rails-server}/test_helper.rb | 0 .../to_time_preserves_timezone.rb | 0 .../src/main/resources/{rails5 => ruby-on-rails-server}/update | 0 .../{rails5 => ruby-on-rails-server}/wrap_parameters.rb | 0 59 files changed, 2 insertions(+), 2 deletions(-) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/.keep (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/404.html (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/422.html (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/500.html (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/Gemfile (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/README.md (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/Rakefile (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/active_record_belongs_to_required_by_default.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/apple-touch-icon-precomposed.png (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/apple-touch-icon.png (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/application.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/application_controller.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/application_controller_renderer.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/application_job.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/application_mailer.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/application_record.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/backtrace_silencers.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/boot.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/bundle (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/cable.yml (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/callback_terminator.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/channel.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/config.ru (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/connection.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/controller.mustache (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/cors.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/database.yml (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/development.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/en.yml (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/environment.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/favicon.ico (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/filter_parameter_logging.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/inflections.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/info.mustache (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/mailer.html.erb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/mailer.text.erb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/migrate.mustache (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/mime_types.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/model.mustache (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/production.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/puma.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/rails (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/rake (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/restart.txt (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/robots.txt (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/routes.mustache (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/schema.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/secrets.yml (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/seeds.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/setup (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/spring.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/ssl_options.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/test.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/test_helper.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/to_time_preserves_timezone.rb (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/update (100%) rename modules/openapi-generator/src/main/resources/{rails5 => ruby-on-rails-server}/wrap_parameters.rb (100%) diff --git a/bin/rails5-petstore-server.sh b/bin/rails5-petstore-server.sh index 51766e15bde0..6275297b8be9 100755 --- a/bin/rails5-petstore-server.sh +++ b/bin/rails5-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/rails5 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/rails5 $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-on-rails-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/rails5 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java index 94ea7fb90f89..d6d62f516d8c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java @@ -85,7 +85,7 @@ public RubyOnRailsServerCodegen() { modelPackage = "app/models"; modelTemplateFiles.put("model.mustache", ".rb"); - embeddedTemplateDir = templateDir = "rails5"; + embeddedTemplateDir = templateDir = "ruby-on-rails-server"; typeMapping.clear(); languageSpecificPrimitives.clear(); diff --git a/modules/openapi-generator/src/main/resources/rails5/.keep b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/.keep similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/.keep rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/.keep diff --git a/modules/openapi-generator/src/main/resources/rails5/404.html b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/404.html similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/404.html rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/404.html diff --git a/modules/openapi-generator/src/main/resources/rails5/422.html b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/422.html similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/422.html rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/422.html diff --git a/modules/openapi-generator/src/main/resources/rails5/500.html b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/500.html similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/500.html rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/500.html diff --git a/modules/openapi-generator/src/main/resources/rails5/Gemfile b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/Gemfile similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/Gemfile rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/Gemfile diff --git a/modules/openapi-generator/src/main/resources/rails5/README.md b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/README.md similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/README.md rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/README.md diff --git a/modules/openapi-generator/src/main/resources/rails5/Rakefile b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/Rakefile similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/Rakefile rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/Rakefile diff --git a/modules/openapi-generator/src/main/resources/rails5/active_record_belongs_to_required_by_default.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/active_record_belongs_to_required_by_default.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/active_record_belongs_to_required_by_default.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/active_record_belongs_to_required_by_default.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/apple-touch-icon-precomposed.png b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/apple-touch-icon-precomposed.png similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/apple-touch-icon-precomposed.png rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/apple-touch-icon-precomposed.png diff --git a/modules/openapi-generator/src/main/resources/rails5/apple-touch-icon.png b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/apple-touch-icon.png similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/apple-touch-icon.png rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/apple-touch-icon.png diff --git a/modules/openapi-generator/src/main/resources/rails5/application.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/application.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/application.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/application.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/application_controller.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_controller.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/application_controller.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_controller.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/application_controller_renderer.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_controller_renderer.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/application_controller_renderer.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_controller_renderer.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/application_job.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_job.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/application_job.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_job.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/application_mailer.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_mailer.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/application_mailer.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_mailer.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/application_record.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_record.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/application_record.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/application_record.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/backtrace_silencers.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/backtrace_silencers.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/backtrace_silencers.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/backtrace_silencers.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/boot.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/boot.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/boot.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/boot.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/bundle b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/bundle similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/bundle rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/bundle diff --git a/modules/openapi-generator/src/main/resources/rails5/cable.yml b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/cable.yml similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/cable.yml rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/cable.yml diff --git a/modules/openapi-generator/src/main/resources/rails5/callback_terminator.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/callback_terminator.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/callback_terminator.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/callback_terminator.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/channel.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/channel.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/channel.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/channel.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/config.ru b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/config.ru similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/config.ru rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/config.ru diff --git a/modules/openapi-generator/src/main/resources/rails5/connection.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/connection.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/connection.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/connection.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/controller.mustache b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/controller.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/controller.mustache rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/controller.mustache diff --git a/modules/openapi-generator/src/main/resources/rails5/cors.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/cors.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/cors.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/cors.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/database.yml b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/database.yml similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/database.yml rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/database.yml diff --git a/modules/openapi-generator/src/main/resources/rails5/development.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/development.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/development.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/development.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/en.yml b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/en.yml similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/en.yml rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/en.yml diff --git a/modules/openapi-generator/src/main/resources/rails5/environment.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/environment.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/environment.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/environment.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/favicon.ico b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/favicon.ico similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/favicon.ico rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/favicon.ico diff --git a/modules/openapi-generator/src/main/resources/rails5/filter_parameter_logging.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/filter_parameter_logging.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/filter_parameter_logging.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/filter_parameter_logging.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/inflections.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/inflections.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/inflections.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/inflections.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/info.mustache b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/info.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/info.mustache rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/info.mustache diff --git a/modules/openapi-generator/src/main/resources/rails5/mailer.html.erb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/mailer.html.erb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/mailer.html.erb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/mailer.html.erb diff --git a/modules/openapi-generator/src/main/resources/rails5/mailer.text.erb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/mailer.text.erb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/mailer.text.erb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/mailer.text.erb diff --git a/modules/openapi-generator/src/main/resources/rails5/migrate.mustache b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/migrate.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/migrate.mustache rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/migrate.mustache diff --git a/modules/openapi-generator/src/main/resources/rails5/mime_types.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/mime_types.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/mime_types.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/mime_types.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/model.mustache b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/model.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/model.mustache rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/model.mustache diff --git a/modules/openapi-generator/src/main/resources/rails5/production.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/production.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/production.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/production.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/puma.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/puma.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/puma.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/puma.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/rails b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/rails similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/rails rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/rails diff --git a/modules/openapi-generator/src/main/resources/rails5/rake b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/rake similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/rake rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/rake diff --git a/modules/openapi-generator/src/main/resources/rails5/restart.txt b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/restart.txt similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/restart.txt rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/restart.txt diff --git a/modules/openapi-generator/src/main/resources/rails5/robots.txt b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/robots.txt similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/robots.txt rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/robots.txt diff --git a/modules/openapi-generator/src/main/resources/rails5/routes.mustache b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/routes.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/routes.mustache rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/routes.mustache diff --git a/modules/openapi-generator/src/main/resources/rails5/schema.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/schema.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/schema.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/schema.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/secrets.yml b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/secrets.yml similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/secrets.yml rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/secrets.yml diff --git a/modules/openapi-generator/src/main/resources/rails5/seeds.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/seeds.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/seeds.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/seeds.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/setup b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/setup similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/setup rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/setup diff --git a/modules/openapi-generator/src/main/resources/rails5/spring.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/spring.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/spring.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/spring.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/ssl_options.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/ssl_options.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/ssl_options.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/ssl_options.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/test.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/test.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/test.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/test.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/test_helper.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/test_helper.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/test_helper.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/test_helper.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/to_time_preserves_timezone.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/to_time_preserves_timezone.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/to_time_preserves_timezone.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/to_time_preserves_timezone.rb diff --git a/modules/openapi-generator/src/main/resources/rails5/update b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/update similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/update rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/update diff --git a/modules/openapi-generator/src/main/resources/rails5/wrap_parameters.rb b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/wrap_parameters.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/rails5/wrap_parameters.rb rename to modules/openapi-generator/src/main/resources/ruby-on-rails-server/wrap_parameters.rb From ef80c58fd42b80fbc09127f036d4e2b98622f444 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:36:14 +0900 Subject: [PATCH 02/13] Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh --- ...rails5-petstore-server.sh => ruby-on-rails-server-petstore.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bin/{rails5-petstore-server.sh => ruby-on-rails-server-petstore.sh} (100%) diff --git a/bin/rails5-petstore-server.sh b/bin/ruby-on-rails-server-petstore.sh similarity index 100% rename from bin/rails5-petstore-server.sh rename to bin/ruby-on-rails-server-petstore.sh From 6a80caa51ac13755cccfc949bfc8de7604a9529d Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:37:57 +0900 Subject: [PATCH 03/13] Rename sample folder: rails5 -> ruby-on-rails --- bin/ruby-on-rails-server-petstore.sh | 2 +- .../{rails5 => ruby-on-rails}/.openapi-generator-ignore | 0 .../{rails5 => ruby-on-rails}/.openapi-generator/VERSION | 0 samples/server/petstore/{rails5 => ruby-on-rails}/Gemfile | 0 samples/server/petstore/{rails5 => ruby-on-rails}/README.md | 0 samples/server/petstore/{rails5 => ruby-on-rails}/Rakefile | 0 .../app/channels/application_cable/channel.rb | 0 .../app/channels/application_cable/connection.rb | 0 .../app/controllers/application_controller.rb | 0 .../{rails5 => ruby-on-rails}/app/controllers/pet_controller.rb | 0 .../app/controllers/store_controller.rb | 0 .../app/controllers/user_controller.rb | 0 .../{rails5 => ruby-on-rails}/app/jobs/application_job.rb | 0 .../{rails5 => ruby-on-rails}/app/mailers/application_mailer.rb | 0 .../{rails5 => ruby-on-rails}/app/models/api_response.rb | 0 .../{rails5 => ruby-on-rails}/app/models/application_record.rb | 0 .../petstore/{rails5 => ruby-on-rails}/app/models/category.rb | 0 .../petstore/{rails5 => ruby-on-rails}/app/models/order.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/app/models/pet.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/app/models/tag.rb | 0 .../petstore/{rails5 => ruby-on-rails}/app/models/user.rb | 0 .../{rails5 => ruby-on-rails}/app/views/layouts/mailer.html.erb | 0 .../{rails5 => ruby-on-rails}/app/views/layouts/mailer.text.erb | 0 samples/server/petstore/{rails5 => ruby-on-rails}/bin/bundle | 0 samples/server/petstore/{rails5 => ruby-on-rails}/bin/rails | 0 samples/server/petstore/{rails5 => ruby-on-rails}/bin/rake | 0 samples/server/petstore/{rails5 => ruby-on-rails}/bin/setup | 0 samples/server/petstore/{rails5 => ruby-on-rails}/bin/update | 0 samples/server/petstore/{rails5 => ruby-on-rails}/config.ru | 0 .../petstore/{rails5 => ruby-on-rails}/config/application.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/config/boot.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/config/cable.yml | 0 .../petstore/{rails5 => ruby-on-rails}/config/database.yml | 0 .../petstore/{rails5 => ruby-on-rails}/config/environment.rb | 0 .../config/environments/development.rb | 0 .../{rails5 => ruby-on-rails}/config/environments/production.rb | 0 .../active_record_belongs_to_required_by_default.rb | 0 .../config/initializers/application_controller_renderer.rb | 0 .../config/initializers/backtrace_silencers.rb | 0 .../config/initializers/callback_terminator.rb | 0 .../{rails5 => ruby-on-rails}/config/initializers/cors.rb | 0 .../config/initializers/filter_parameter_logging.rb | 0 .../config/initializers/inflections.rb | 0 .../{rails5 => ruby-on-rails}/config/initializers/mime_types.rb | 0 .../config/initializers/ssl_options.rb | 0 .../config/initializers/to_time_preserves_timezone.rb | 0 .../petstore/{rails5 => ruby-on-rails}/config/locales/en.yml | 0 .../server/petstore/{rails5 => ruby-on-rails}/config/puma.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/config/routes.rb | 0 .../petstore/{rails5 => ruby-on-rails}/config/secrets.yml | 0 .../server/petstore/{rails5 => ruby-on-rails}/config/spring.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/db/migrate/.keep | 0 .../{rails5 => ruby-on-rails}/db/migrate/0_init_tables.rb | 0 samples/server/petstore/{rails5 => ruby-on-rails}/db/schema.rb | 0 samples/server/petstore/{rails5 => ruby-on-rails}/db/seeds.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/lib/tasks/.keep | 0 samples/server/petstore/{rails5 => ruby-on-rails}/log/.keep | 0 .../server/petstore/{rails5 => ruby-on-rails}/public/404.html | 0 .../server/petstore/{rails5 => ruby-on-rails}/public/422.html | 0 .../server/petstore/{rails5 => ruby-on-rails}/public/500.html | 0 .../public/apple-touch-icon-precomposed.png | 0 .../{rails5 => ruby-on-rails}/public/apple-touch-icon.png | 0 .../petstore/{rails5 => ruby-on-rails}/public/favicon.ico | 0 .../server/petstore/{rails5 => ruby-on-rails}/public/robots.txt | 0 .../petstore/{rails5 => ruby-on-rails}/test/test_helper.rb | 0 .../server/petstore/{rails5 => ruby-on-rails}/tmp/cache/.keep | 0 .../server/petstore/{rails5 => ruby-on-rails}/tmp/pids/.keep | 0 .../server/petstore/{rails5 => ruby-on-rails}/tmp/restart.txt | 0 .../server/petstore/{rails5 => ruby-on-rails}/tmp/sockets/.keep | 0 samples/server/petstore/{rails5 => ruby-on-rails}/vendor/.keep | 0 70 files changed, 1 insertion(+), 1 deletion(-) rename samples/server/petstore/{rails5 => ruby-on-rails}/.openapi-generator-ignore (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/.openapi-generator/VERSION (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/Gemfile (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/README.md (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/Rakefile (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/channels/application_cable/channel.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/channels/application_cable/connection.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/controllers/application_controller.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/controllers/pet_controller.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/controllers/store_controller.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/controllers/user_controller.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/jobs/application_job.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/mailers/application_mailer.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/api_response.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/application_record.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/category.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/order.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/pet.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/tag.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/models/user.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/views/layouts/mailer.html.erb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/app/views/layouts/mailer.text.erb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/bin/bundle (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/bin/rails (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/bin/rake (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/bin/setup (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/bin/update (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config.ru (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/application.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/boot.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/cable.yml (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/database.yml (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/environment.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/environments/development.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/environments/production.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/active_record_belongs_to_required_by_default.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/application_controller_renderer.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/backtrace_silencers.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/callback_terminator.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/cors.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/filter_parameter_logging.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/inflections.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/mime_types.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/ssl_options.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/initializers/to_time_preserves_timezone.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/locales/en.yml (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/puma.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/routes.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/secrets.yml (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/config/spring.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/db/migrate/.keep (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/db/migrate/0_init_tables.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/db/schema.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/db/seeds.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/lib/tasks/.keep (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/log/.keep (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/404.html (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/422.html (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/500.html (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/apple-touch-icon-precomposed.png (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/apple-touch-icon.png (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/favicon.ico (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/public/robots.txt (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/test/test_helper.rb (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/tmp/cache/.keep (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/tmp/pids/.keep (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/tmp/restart.txt (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/tmp/sockets/.keep (100%) rename samples/server/petstore/{rails5 => ruby-on-rails}/vendor/.keep (100%) diff --git a/bin/ruby-on-rails-server-petstore.sh b/bin/ruby-on-rails-server-petstore.sh index 6275297b8be9..ad3c05d03ac0 100755 --- a/bin/ruby-on-rails-server-petstore.sh +++ b/bin/ruby-on-rails-server-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 -t modules/openapi-generator/src/main/resources/ruby-on-rails-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/rails5 $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-on-rails-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/ruby-on-rails $@" java $JAVA_OPTS -jar $executable $ags diff --git a/samples/server/petstore/rails5/.openapi-generator-ignore b/samples/server/petstore/ruby-on-rails/.openapi-generator-ignore similarity index 100% rename from samples/server/petstore/rails5/.openapi-generator-ignore rename to samples/server/petstore/ruby-on-rails/.openapi-generator-ignore diff --git a/samples/server/petstore/rails5/.openapi-generator/VERSION b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION similarity index 100% rename from samples/server/petstore/rails5/.openapi-generator/VERSION rename to samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION diff --git a/samples/server/petstore/rails5/Gemfile b/samples/server/petstore/ruby-on-rails/Gemfile similarity index 100% rename from samples/server/petstore/rails5/Gemfile rename to samples/server/petstore/ruby-on-rails/Gemfile diff --git a/samples/server/petstore/rails5/README.md b/samples/server/petstore/ruby-on-rails/README.md similarity index 100% rename from samples/server/petstore/rails5/README.md rename to samples/server/petstore/ruby-on-rails/README.md diff --git a/samples/server/petstore/rails5/Rakefile b/samples/server/petstore/ruby-on-rails/Rakefile similarity index 100% rename from samples/server/petstore/rails5/Rakefile rename to samples/server/petstore/ruby-on-rails/Rakefile diff --git a/samples/server/petstore/rails5/app/channels/application_cable/channel.rb b/samples/server/petstore/ruby-on-rails/app/channels/application_cable/channel.rb similarity index 100% rename from samples/server/petstore/rails5/app/channels/application_cable/channel.rb rename to samples/server/petstore/ruby-on-rails/app/channels/application_cable/channel.rb diff --git a/samples/server/petstore/rails5/app/channels/application_cable/connection.rb b/samples/server/petstore/ruby-on-rails/app/channels/application_cable/connection.rb similarity index 100% rename from samples/server/petstore/rails5/app/channels/application_cable/connection.rb rename to samples/server/petstore/ruby-on-rails/app/channels/application_cable/connection.rb diff --git a/samples/server/petstore/rails5/app/controllers/application_controller.rb b/samples/server/petstore/ruby-on-rails/app/controllers/application_controller.rb similarity index 100% rename from samples/server/petstore/rails5/app/controllers/application_controller.rb rename to samples/server/petstore/ruby-on-rails/app/controllers/application_controller.rb diff --git a/samples/server/petstore/rails5/app/controllers/pet_controller.rb b/samples/server/petstore/ruby-on-rails/app/controllers/pet_controller.rb similarity index 100% rename from samples/server/petstore/rails5/app/controllers/pet_controller.rb rename to samples/server/petstore/ruby-on-rails/app/controllers/pet_controller.rb diff --git a/samples/server/petstore/rails5/app/controllers/store_controller.rb b/samples/server/petstore/ruby-on-rails/app/controllers/store_controller.rb similarity index 100% rename from samples/server/petstore/rails5/app/controllers/store_controller.rb rename to samples/server/petstore/ruby-on-rails/app/controllers/store_controller.rb diff --git a/samples/server/petstore/rails5/app/controllers/user_controller.rb b/samples/server/petstore/ruby-on-rails/app/controllers/user_controller.rb similarity index 100% rename from samples/server/petstore/rails5/app/controllers/user_controller.rb rename to samples/server/petstore/ruby-on-rails/app/controllers/user_controller.rb diff --git a/samples/server/petstore/rails5/app/jobs/application_job.rb b/samples/server/petstore/ruby-on-rails/app/jobs/application_job.rb similarity index 100% rename from samples/server/petstore/rails5/app/jobs/application_job.rb rename to samples/server/petstore/ruby-on-rails/app/jobs/application_job.rb diff --git a/samples/server/petstore/rails5/app/mailers/application_mailer.rb b/samples/server/petstore/ruby-on-rails/app/mailers/application_mailer.rb similarity index 100% rename from samples/server/petstore/rails5/app/mailers/application_mailer.rb rename to samples/server/petstore/ruby-on-rails/app/mailers/application_mailer.rb diff --git a/samples/server/petstore/rails5/app/models/api_response.rb b/samples/server/petstore/ruby-on-rails/app/models/api_response.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/api_response.rb rename to samples/server/petstore/ruby-on-rails/app/models/api_response.rb diff --git a/samples/server/petstore/rails5/app/models/application_record.rb b/samples/server/petstore/ruby-on-rails/app/models/application_record.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/application_record.rb rename to samples/server/petstore/ruby-on-rails/app/models/application_record.rb diff --git a/samples/server/petstore/rails5/app/models/category.rb b/samples/server/petstore/ruby-on-rails/app/models/category.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/category.rb rename to samples/server/petstore/ruby-on-rails/app/models/category.rb diff --git a/samples/server/petstore/rails5/app/models/order.rb b/samples/server/petstore/ruby-on-rails/app/models/order.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/order.rb rename to samples/server/petstore/ruby-on-rails/app/models/order.rb diff --git a/samples/server/petstore/rails5/app/models/pet.rb b/samples/server/petstore/ruby-on-rails/app/models/pet.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/pet.rb rename to samples/server/petstore/ruby-on-rails/app/models/pet.rb diff --git a/samples/server/petstore/rails5/app/models/tag.rb b/samples/server/petstore/ruby-on-rails/app/models/tag.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/tag.rb rename to samples/server/petstore/ruby-on-rails/app/models/tag.rb diff --git a/samples/server/petstore/rails5/app/models/user.rb b/samples/server/petstore/ruby-on-rails/app/models/user.rb similarity index 100% rename from samples/server/petstore/rails5/app/models/user.rb rename to samples/server/petstore/ruby-on-rails/app/models/user.rb diff --git a/samples/server/petstore/rails5/app/views/layouts/mailer.html.erb b/samples/server/petstore/ruby-on-rails/app/views/layouts/mailer.html.erb similarity index 100% rename from samples/server/petstore/rails5/app/views/layouts/mailer.html.erb rename to samples/server/petstore/ruby-on-rails/app/views/layouts/mailer.html.erb diff --git a/samples/server/petstore/rails5/app/views/layouts/mailer.text.erb b/samples/server/petstore/ruby-on-rails/app/views/layouts/mailer.text.erb similarity index 100% rename from samples/server/petstore/rails5/app/views/layouts/mailer.text.erb rename to samples/server/petstore/ruby-on-rails/app/views/layouts/mailer.text.erb diff --git a/samples/server/petstore/rails5/bin/bundle b/samples/server/petstore/ruby-on-rails/bin/bundle similarity index 100% rename from samples/server/petstore/rails5/bin/bundle rename to samples/server/petstore/ruby-on-rails/bin/bundle diff --git a/samples/server/petstore/rails5/bin/rails b/samples/server/petstore/ruby-on-rails/bin/rails similarity index 100% rename from samples/server/petstore/rails5/bin/rails rename to samples/server/petstore/ruby-on-rails/bin/rails diff --git a/samples/server/petstore/rails5/bin/rake b/samples/server/petstore/ruby-on-rails/bin/rake similarity index 100% rename from samples/server/petstore/rails5/bin/rake rename to samples/server/petstore/ruby-on-rails/bin/rake diff --git a/samples/server/petstore/rails5/bin/setup b/samples/server/petstore/ruby-on-rails/bin/setup similarity index 100% rename from samples/server/petstore/rails5/bin/setup rename to samples/server/petstore/ruby-on-rails/bin/setup diff --git a/samples/server/petstore/rails5/bin/update b/samples/server/petstore/ruby-on-rails/bin/update similarity index 100% rename from samples/server/petstore/rails5/bin/update rename to samples/server/petstore/ruby-on-rails/bin/update diff --git a/samples/server/petstore/rails5/config.ru b/samples/server/petstore/ruby-on-rails/config.ru similarity index 100% rename from samples/server/petstore/rails5/config.ru rename to samples/server/petstore/ruby-on-rails/config.ru diff --git a/samples/server/petstore/rails5/config/application.rb b/samples/server/petstore/ruby-on-rails/config/application.rb similarity index 100% rename from samples/server/petstore/rails5/config/application.rb rename to samples/server/petstore/ruby-on-rails/config/application.rb diff --git a/samples/server/petstore/rails5/config/boot.rb b/samples/server/petstore/ruby-on-rails/config/boot.rb similarity index 100% rename from samples/server/petstore/rails5/config/boot.rb rename to samples/server/petstore/ruby-on-rails/config/boot.rb diff --git a/samples/server/petstore/rails5/config/cable.yml b/samples/server/petstore/ruby-on-rails/config/cable.yml similarity index 100% rename from samples/server/petstore/rails5/config/cable.yml rename to samples/server/petstore/ruby-on-rails/config/cable.yml diff --git a/samples/server/petstore/rails5/config/database.yml b/samples/server/petstore/ruby-on-rails/config/database.yml similarity index 100% rename from samples/server/petstore/rails5/config/database.yml rename to samples/server/petstore/ruby-on-rails/config/database.yml diff --git a/samples/server/petstore/rails5/config/environment.rb b/samples/server/petstore/ruby-on-rails/config/environment.rb similarity index 100% rename from samples/server/petstore/rails5/config/environment.rb rename to samples/server/petstore/ruby-on-rails/config/environment.rb diff --git a/samples/server/petstore/rails5/config/environments/development.rb b/samples/server/petstore/ruby-on-rails/config/environments/development.rb similarity index 100% rename from samples/server/petstore/rails5/config/environments/development.rb rename to samples/server/petstore/ruby-on-rails/config/environments/development.rb diff --git a/samples/server/petstore/rails5/config/environments/production.rb b/samples/server/petstore/ruby-on-rails/config/environments/production.rb similarity index 100% rename from samples/server/petstore/rails5/config/environments/production.rb rename to samples/server/petstore/ruby-on-rails/config/environments/production.rb diff --git a/samples/server/petstore/rails5/config/initializers/active_record_belongs_to_required_by_default.rb b/samples/server/petstore/ruby-on-rails/config/initializers/active_record_belongs_to_required_by_default.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/active_record_belongs_to_required_by_default.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/active_record_belongs_to_required_by_default.rb diff --git a/samples/server/petstore/rails5/config/initializers/application_controller_renderer.rb b/samples/server/petstore/ruby-on-rails/config/initializers/application_controller_renderer.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/application_controller_renderer.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/application_controller_renderer.rb diff --git a/samples/server/petstore/rails5/config/initializers/backtrace_silencers.rb b/samples/server/petstore/ruby-on-rails/config/initializers/backtrace_silencers.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/backtrace_silencers.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/backtrace_silencers.rb diff --git a/samples/server/petstore/rails5/config/initializers/callback_terminator.rb b/samples/server/petstore/ruby-on-rails/config/initializers/callback_terminator.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/callback_terminator.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/callback_terminator.rb diff --git a/samples/server/petstore/rails5/config/initializers/cors.rb b/samples/server/petstore/ruby-on-rails/config/initializers/cors.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/cors.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/cors.rb diff --git a/samples/server/petstore/rails5/config/initializers/filter_parameter_logging.rb b/samples/server/petstore/ruby-on-rails/config/initializers/filter_parameter_logging.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/filter_parameter_logging.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/filter_parameter_logging.rb diff --git a/samples/server/petstore/rails5/config/initializers/inflections.rb b/samples/server/petstore/ruby-on-rails/config/initializers/inflections.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/inflections.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/inflections.rb diff --git a/samples/server/petstore/rails5/config/initializers/mime_types.rb b/samples/server/petstore/ruby-on-rails/config/initializers/mime_types.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/mime_types.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/mime_types.rb diff --git a/samples/server/petstore/rails5/config/initializers/ssl_options.rb b/samples/server/petstore/ruby-on-rails/config/initializers/ssl_options.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/ssl_options.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/ssl_options.rb diff --git a/samples/server/petstore/rails5/config/initializers/to_time_preserves_timezone.rb b/samples/server/petstore/ruby-on-rails/config/initializers/to_time_preserves_timezone.rb similarity index 100% rename from samples/server/petstore/rails5/config/initializers/to_time_preserves_timezone.rb rename to samples/server/petstore/ruby-on-rails/config/initializers/to_time_preserves_timezone.rb diff --git a/samples/server/petstore/rails5/config/locales/en.yml b/samples/server/petstore/ruby-on-rails/config/locales/en.yml similarity index 100% rename from samples/server/petstore/rails5/config/locales/en.yml rename to samples/server/petstore/ruby-on-rails/config/locales/en.yml diff --git a/samples/server/petstore/rails5/config/puma.rb b/samples/server/petstore/ruby-on-rails/config/puma.rb similarity index 100% rename from samples/server/petstore/rails5/config/puma.rb rename to samples/server/petstore/ruby-on-rails/config/puma.rb diff --git a/samples/server/petstore/rails5/config/routes.rb b/samples/server/petstore/ruby-on-rails/config/routes.rb similarity index 100% rename from samples/server/petstore/rails5/config/routes.rb rename to samples/server/petstore/ruby-on-rails/config/routes.rb diff --git a/samples/server/petstore/rails5/config/secrets.yml b/samples/server/petstore/ruby-on-rails/config/secrets.yml similarity index 100% rename from samples/server/petstore/rails5/config/secrets.yml rename to samples/server/petstore/ruby-on-rails/config/secrets.yml diff --git a/samples/server/petstore/rails5/config/spring.rb b/samples/server/petstore/ruby-on-rails/config/spring.rb similarity index 100% rename from samples/server/petstore/rails5/config/spring.rb rename to samples/server/petstore/ruby-on-rails/config/spring.rb diff --git a/samples/server/petstore/rails5/db/migrate/.keep b/samples/server/petstore/ruby-on-rails/db/migrate/.keep similarity index 100% rename from samples/server/petstore/rails5/db/migrate/.keep rename to samples/server/petstore/ruby-on-rails/db/migrate/.keep diff --git a/samples/server/petstore/rails5/db/migrate/0_init_tables.rb b/samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb similarity index 100% rename from samples/server/petstore/rails5/db/migrate/0_init_tables.rb rename to samples/server/petstore/ruby-on-rails/db/migrate/0_init_tables.rb diff --git a/samples/server/petstore/rails5/db/schema.rb b/samples/server/petstore/ruby-on-rails/db/schema.rb similarity index 100% rename from samples/server/petstore/rails5/db/schema.rb rename to samples/server/petstore/ruby-on-rails/db/schema.rb diff --git a/samples/server/petstore/rails5/db/seeds.rb b/samples/server/petstore/ruby-on-rails/db/seeds.rb similarity index 100% rename from samples/server/petstore/rails5/db/seeds.rb rename to samples/server/petstore/ruby-on-rails/db/seeds.rb diff --git a/samples/server/petstore/rails5/lib/tasks/.keep b/samples/server/petstore/ruby-on-rails/lib/tasks/.keep similarity index 100% rename from samples/server/petstore/rails5/lib/tasks/.keep rename to samples/server/petstore/ruby-on-rails/lib/tasks/.keep diff --git a/samples/server/petstore/rails5/log/.keep b/samples/server/petstore/ruby-on-rails/log/.keep similarity index 100% rename from samples/server/petstore/rails5/log/.keep rename to samples/server/petstore/ruby-on-rails/log/.keep diff --git a/samples/server/petstore/rails5/public/404.html b/samples/server/petstore/ruby-on-rails/public/404.html similarity index 100% rename from samples/server/petstore/rails5/public/404.html rename to samples/server/petstore/ruby-on-rails/public/404.html diff --git a/samples/server/petstore/rails5/public/422.html b/samples/server/petstore/ruby-on-rails/public/422.html similarity index 100% rename from samples/server/petstore/rails5/public/422.html rename to samples/server/petstore/ruby-on-rails/public/422.html diff --git a/samples/server/petstore/rails5/public/500.html b/samples/server/petstore/ruby-on-rails/public/500.html similarity index 100% rename from samples/server/petstore/rails5/public/500.html rename to samples/server/petstore/ruby-on-rails/public/500.html diff --git a/samples/server/petstore/rails5/public/apple-touch-icon-precomposed.png b/samples/server/petstore/ruby-on-rails/public/apple-touch-icon-precomposed.png similarity index 100% rename from samples/server/petstore/rails5/public/apple-touch-icon-precomposed.png rename to samples/server/petstore/ruby-on-rails/public/apple-touch-icon-precomposed.png diff --git a/samples/server/petstore/rails5/public/apple-touch-icon.png b/samples/server/petstore/ruby-on-rails/public/apple-touch-icon.png similarity index 100% rename from samples/server/petstore/rails5/public/apple-touch-icon.png rename to samples/server/petstore/ruby-on-rails/public/apple-touch-icon.png diff --git a/samples/server/petstore/rails5/public/favicon.ico b/samples/server/petstore/ruby-on-rails/public/favicon.ico similarity index 100% rename from samples/server/petstore/rails5/public/favicon.ico rename to samples/server/petstore/ruby-on-rails/public/favicon.ico diff --git a/samples/server/petstore/rails5/public/robots.txt b/samples/server/petstore/ruby-on-rails/public/robots.txt similarity index 100% rename from samples/server/petstore/rails5/public/robots.txt rename to samples/server/petstore/ruby-on-rails/public/robots.txt diff --git a/samples/server/petstore/rails5/test/test_helper.rb b/samples/server/petstore/ruby-on-rails/test/test_helper.rb similarity index 100% rename from samples/server/petstore/rails5/test/test_helper.rb rename to samples/server/petstore/ruby-on-rails/test/test_helper.rb diff --git a/samples/server/petstore/rails5/tmp/cache/.keep b/samples/server/petstore/ruby-on-rails/tmp/cache/.keep similarity index 100% rename from samples/server/petstore/rails5/tmp/cache/.keep rename to samples/server/petstore/ruby-on-rails/tmp/cache/.keep diff --git a/samples/server/petstore/rails5/tmp/pids/.keep b/samples/server/petstore/ruby-on-rails/tmp/pids/.keep similarity index 100% rename from samples/server/petstore/rails5/tmp/pids/.keep rename to samples/server/petstore/ruby-on-rails/tmp/pids/.keep diff --git a/samples/server/petstore/rails5/tmp/restart.txt b/samples/server/petstore/ruby-on-rails/tmp/restart.txt similarity index 100% rename from samples/server/petstore/rails5/tmp/restart.txt rename to samples/server/petstore/ruby-on-rails/tmp/restart.txt diff --git a/samples/server/petstore/rails5/tmp/sockets/.keep b/samples/server/petstore/ruby-on-rails/tmp/sockets/.keep similarity index 100% rename from samples/server/petstore/rails5/tmp/sockets/.keep rename to samples/server/petstore/ruby-on-rails/tmp/sockets/.keep diff --git a/samples/server/petstore/rails5/vendor/.keep b/samples/server/petstore/ruby-on-rails/vendor/.keep similarity index 100% rename from samples/server/petstore/rails5/vendor/.keep rename to samples/server/petstore/ruby-on-rails/vendor/.keep From ebcd04ce22cf41313c6a7af677b116e778d80a0c Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:39:56 +0900 Subject: [PATCH 04/13] Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh --- ...rails5-petstore-server.sh => ruby-on-rails-server-petstore.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bin/openapi3/{rails5-petstore-server.sh => ruby-on-rails-server-petstore.sh} (100%) diff --git a/bin/openapi3/rails5-petstore-server.sh b/bin/openapi3/ruby-on-rails-server-petstore.sh similarity index 100% rename from bin/openapi3/rails5-petstore-server.sh rename to bin/openapi3/ruby-on-rails-server-petstore.sh From 7c43eb82529c8a6a1190fd80d2efdfeb05c622d9 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:41:10 +0900 Subject: [PATCH 05/13] Update ruby-on-rails-server-petstore.sh --- bin/openapi3/ruby-on-rails-server-petstore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/openapi3/ruby-on-rails-server-petstore.sh b/bin/openapi3/ruby-on-rails-server-petstore.sh index f83f838ae9fd..6f44cdd1ab63 100755 --- a/bin/openapi3/ruby-on-rails-server-petstore.sh +++ b/bin/openapi3/ruby-on-rails-server-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 -t modules/openapi-generator/src/main/resources/rails5 -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/rails5 $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-on-rails-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/ruby-on-rails $@" java $JAVA_OPTS -jar $executable $ags From 35ac730642e45174b072b02eef4ce04223291a03 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:44:03 +0900 Subject: [PATCH 06/13] Rename templateDir: sinatra -> ruby-sinatra-server --- .../codegen/languages/RubySinatraServerCodegen.java | 2 +- .../src/main/resources/{sinatra => ruby-sinatra-server}/Gemfile | 0 .../resources/{sinatra => ruby-sinatra-server}/OpenAPIing.rb | 0 .../main/resources/{sinatra => ruby-sinatra-server}/README.md | 0 .../resources/{sinatra => ruby-sinatra-server}/api.mustache | 0 .../main/resources/{sinatra => ruby-sinatra-server}/config.ru | 0 .../resources/{sinatra => ruby-sinatra-server}/my_app.mustache | 0 .../resources/{sinatra => ruby-sinatra-server}/openapi.mustache | 0 8 files changed, 1 insertion(+), 1 deletion(-) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/Gemfile (100%) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/OpenAPIing.rb (100%) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/README.md (100%) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/api.mustache (100%) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/config.ru (100%) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/my_app.mustache (100%) rename modules/openapi-generator/src/main/resources/{sinatra => ruby-sinatra-server}/openapi.mustache (100%) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java index 913243da88c1..9f8ecfbde49f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java @@ -56,7 +56,7 @@ public RubySinatraServerCodegen() { // no model modelTemplateFiles.clear(); apiTemplateFiles.put("api.mustache", ".rb"); - embeddedTemplateDir = templateDir = "sinatra"; + embeddedTemplateDir = templateDir = "ruby-sinatra-server"; typeMapping.clear(); languageSpecificPrimitives.clear(); diff --git a/modules/openapi-generator/src/main/resources/sinatra/Gemfile b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/Gemfile similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/Gemfile rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/Gemfile diff --git a/modules/openapi-generator/src/main/resources/sinatra/OpenAPIing.rb b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/OpenAPIing.rb similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/OpenAPIing.rb rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/OpenAPIing.rb diff --git a/modules/openapi-generator/src/main/resources/sinatra/README.md b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/README.md similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/README.md rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/README.md diff --git a/modules/openapi-generator/src/main/resources/sinatra/api.mustache b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/api.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/api.mustache rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/api.mustache diff --git a/modules/openapi-generator/src/main/resources/sinatra/config.ru b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/config.ru similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/config.ru rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/config.ru diff --git a/modules/openapi-generator/src/main/resources/sinatra/my_app.mustache b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/my_app.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/my_app.mustache rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/my_app.mustache diff --git a/modules/openapi-generator/src/main/resources/sinatra/openapi.mustache b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/openapi.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/sinatra/openapi.mustache rename to modules/openapi-generator/src/main/resources/ruby-sinatra-server/openapi.mustache From 0a302638517e5b60273c5efc7bd759dada36c9fd Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:46:56 +0900 Subject: [PATCH 07/13] Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh --- ...sinatra-petstore-server.sh => ruby-sinatra-server-petstore.sh} | 0 ...sinatra-petstore-server.sh => ruby-sinatra-server-petstore.sh} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename bin/openapi3/{sinatra-petstore-server.sh => ruby-sinatra-server-petstore.sh} (100%) rename bin/{sinatra-petstore-server.sh => ruby-sinatra-server-petstore.sh} (100%) diff --git a/bin/openapi3/sinatra-petstore-server.sh b/bin/openapi3/ruby-sinatra-server-petstore.sh similarity index 100% rename from bin/openapi3/sinatra-petstore-server.sh rename to bin/openapi3/ruby-sinatra-server-petstore.sh diff --git a/bin/sinatra-petstore-server.sh b/bin/ruby-sinatra-server-petstore.sh similarity index 100% rename from bin/sinatra-petstore-server.sh rename to bin/ruby-sinatra-server-petstore.sh From 9fb085b3905f9b4ef80c706fa5c2ce972cdb66fa Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:48:19 +0900 Subject: [PATCH 08/13] Rename sample folder: sinatra -> ruby-sinatra --- .../petstore/{sinatra => ruby-sinatra}/.openapi-generator-ignore | 0 .../petstore/{sinatra => ruby-sinatra}/.openapi-generator/VERSION | 0 samples/server/petstore/{sinatra => ruby-sinatra}/Gemfile | 0 samples/server/petstore/{sinatra => ruby-sinatra}/Gemfile.lock | 0 samples/server/petstore/{sinatra => ruby-sinatra}/README.md | 0 samples/server/petstore/{sinatra => ruby-sinatra}/api/pet_api.rb | 0 .../server/petstore/{sinatra => ruby-sinatra}/api/store_api.rb | 0 samples/server/petstore/{sinatra => ruby-sinatra}/api/user_api.rb | 0 samples/server/petstore/{sinatra => ruby-sinatra}/config.ru | 0 .../server/petstore/{sinatra => ruby-sinatra}/lib/openapiing.rb | 0 .../server/petstore/{sinatra => ruby-sinatra}/lib/swaggering.rb | 0 samples/server/petstore/{sinatra => ruby-sinatra}/my_app.rb | 0 samples/server/petstore/{sinatra => ruby-sinatra}/openapi.yaml | 0 samples/server/petstore/{sinatra => ruby-sinatra}/swagger.yaml | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename samples/server/petstore/{sinatra => ruby-sinatra}/.openapi-generator-ignore (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/.openapi-generator/VERSION (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/Gemfile (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/Gemfile.lock (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/README.md (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/api/pet_api.rb (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/api/store_api.rb (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/api/user_api.rb (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/config.ru (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/lib/openapiing.rb (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/lib/swaggering.rb (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/my_app.rb (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/openapi.yaml (100%) rename samples/server/petstore/{sinatra => ruby-sinatra}/swagger.yaml (100%) diff --git a/samples/server/petstore/sinatra/.openapi-generator-ignore b/samples/server/petstore/ruby-sinatra/.openapi-generator-ignore similarity index 100% rename from samples/server/petstore/sinatra/.openapi-generator-ignore rename to samples/server/petstore/ruby-sinatra/.openapi-generator-ignore diff --git a/samples/server/petstore/sinatra/.openapi-generator/VERSION b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION similarity index 100% rename from samples/server/petstore/sinatra/.openapi-generator/VERSION rename to samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION diff --git a/samples/server/petstore/sinatra/Gemfile b/samples/server/petstore/ruby-sinatra/Gemfile similarity index 100% rename from samples/server/petstore/sinatra/Gemfile rename to samples/server/petstore/ruby-sinatra/Gemfile diff --git a/samples/server/petstore/sinatra/Gemfile.lock b/samples/server/petstore/ruby-sinatra/Gemfile.lock similarity index 100% rename from samples/server/petstore/sinatra/Gemfile.lock rename to samples/server/petstore/ruby-sinatra/Gemfile.lock diff --git a/samples/server/petstore/sinatra/README.md b/samples/server/petstore/ruby-sinatra/README.md similarity index 100% rename from samples/server/petstore/sinatra/README.md rename to samples/server/petstore/ruby-sinatra/README.md diff --git a/samples/server/petstore/sinatra/api/pet_api.rb b/samples/server/petstore/ruby-sinatra/api/pet_api.rb similarity index 100% rename from samples/server/petstore/sinatra/api/pet_api.rb rename to samples/server/petstore/ruby-sinatra/api/pet_api.rb diff --git a/samples/server/petstore/sinatra/api/store_api.rb b/samples/server/petstore/ruby-sinatra/api/store_api.rb similarity index 100% rename from samples/server/petstore/sinatra/api/store_api.rb rename to samples/server/petstore/ruby-sinatra/api/store_api.rb diff --git a/samples/server/petstore/sinatra/api/user_api.rb b/samples/server/petstore/ruby-sinatra/api/user_api.rb similarity index 100% rename from samples/server/petstore/sinatra/api/user_api.rb rename to samples/server/petstore/ruby-sinatra/api/user_api.rb diff --git a/samples/server/petstore/sinatra/config.ru b/samples/server/petstore/ruby-sinatra/config.ru similarity index 100% rename from samples/server/petstore/sinatra/config.ru rename to samples/server/petstore/ruby-sinatra/config.ru diff --git a/samples/server/petstore/sinatra/lib/openapiing.rb b/samples/server/petstore/ruby-sinatra/lib/openapiing.rb similarity index 100% rename from samples/server/petstore/sinatra/lib/openapiing.rb rename to samples/server/petstore/ruby-sinatra/lib/openapiing.rb diff --git a/samples/server/petstore/sinatra/lib/swaggering.rb b/samples/server/petstore/ruby-sinatra/lib/swaggering.rb similarity index 100% rename from samples/server/petstore/sinatra/lib/swaggering.rb rename to samples/server/petstore/ruby-sinatra/lib/swaggering.rb diff --git a/samples/server/petstore/sinatra/my_app.rb b/samples/server/petstore/ruby-sinatra/my_app.rb similarity index 100% rename from samples/server/petstore/sinatra/my_app.rb rename to samples/server/petstore/ruby-sinatra/my_app.rb diff --git a/samples/server/petstore/sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml similarity index 100% rename from samples/server/petstore/sinatra/openapi.yaml rename to samples/server/petstore/ruby-sinatra/openapi.yaml diff --git a/samples/server/petstore/sinatra/swagger.yaml b/samples/server/petstore/ruby-sinatra/swagger.yaml similarity index 100% rename from samples/server/petstore/sinatra/swagger.yaml rename to samples/server/petstore/ruby-sinatra/swagger.yaml From 0c889d30d382a146841c2ba8a0645b5f6a427774 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:50:01 +0900 Subject: [PATCH 09/13] Update script --- bin/openapi3/ruby-sinatra-server-petstore.sh | 2 +- bin/ruby-sinatra-server-petstore.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/openapi3/ruby-sinatra-server-petstore.sh b/bin/openapi3/ruby-sinatra-server-petstore.sh index cee7dc49ff5c..0494953a9dae 100755 --- a/bin/openapi3/ruby-sinatra-server-petstore.sh +++ b/bin/openapi3/ruby-sinatra-server-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 -t modules/openapi-generator/src/main/resources/sinatra -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby-sinatra -o samples/server/petstore/sinatra $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-sinatra-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby-sinatra -o samples/server/petstore/ruby-sinatra $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ruby-sinatra-server-petstore.sh b/bin/ruby-sinatra-server-petstore.sh index 536a9d35b3c8..6d22f642b490 100755 --- a/bin/ruby-sinatra-server-petstore.sh +++ b/bin/ruby-sinatra-server-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 -t modules/openapi-generator/src/main/resources/sinatra -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby-sinatra -o samples/server/petstore/sinatra $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-sinatra-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby-sinatra -o samples/server/petstore/ruby-sinatra $@" java $JAVA_OPTS -jar $executable $ags From 813e19b18590453754ddcad38db856db9ed4d295 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:54:49 +0900 Subject: [PATCH 10/13] Rename templateDir: ruby -> ruby-client --- .../org/openapitools/codegen/languages/RubyClientCodegen.java | 2 +- .../src/main/resources/{ruby => ruby-client}/Gemfile.mustache | 0 .../src/main/resources/{ruby => ruby-client}/README.mustache | 0 .../src/main/resources/{ruby => ruby-client}/Rakefile.mustache | 0 .../src/main/resources/{ruby => ruby-client}/api.mustache | 0 .../main/resources/{ruby => ruby-client}/api_client.mustache | 0 .../resources/{ruby => ruby-client}/api_client_spec.mustache | 0 .../src/main/resources/{ruby => ruby-client}/api_doc.mustache | 0 .../src/main/resources/{ruby => ruby-client}/api_error.mustache | 0 .../src/main/resources/{ruby => ruby-client}/api_info.mustache | 0 .../src/main/resources/{ruby => ruby-client}/api_test.mustache | 0 .../main/resources/{ruby => ruby-client}/base_object.mustache | 0 .../resources/{ruby => ruby-client}/base_object_spec.mustache | 0 .../main/resources/{ruby => ruby-client}/configuration.mustache | 0 .../resources/{ruby => ruby-client}/configuration_spec.mustache | 0 .../src/main/resources/{ruby => ruby-client}/gem.mustache | 0 .../src/main/resources/{ruby => ruby-client}/gemspec.mustache | 0 .../main/resources/{ruby => ruby-client}/git_push.sh.mustache | 0 .../src/main/resources/{ruby => ruby-client}/gitignore.mustache | 0 .../src/main/resources/{ruby => ruby-client}/model.mustache | 0 .../src/main/resources/{ruby => ruby-client}/model_doc.mustache | 0 .../main/resources/{ruby => ruby-client}/model_test.mustache | 0 .../{ruby => ruby-client}/partial_model_enum_class.mustache | 0 .../{ruby => ruby-client}/partial_model_generic.mustache | 0 .../src/main/resources/{ruby => ruby-client}/rspec.mustache | 0 .../src/main/resources/{ruby => ruby-client}/rubocop.mustache | 0 .../main/resources/{ruby => ruby-client}/spec_helper.mustache | 0 .../src/main/resources/{ruby => ruby-client}/version.mustache | 0 28 files changed, 1 insertion(+), 1 deletion(-) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/Gemfile.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/README.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/Rakefile.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api_client.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api_client_spec.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api_doc.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api_error.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api_info.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/api_test.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/base_object.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/base_object_spec.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/configuration.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/configuration_spec.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/gem.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/gemspec.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/git_push.sh.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/gitignore.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/model.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/model_doc.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/model_test.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/partial_model_enum_class.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/partial_model_generic.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/rspec.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/rubocop.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/spec_helper.mustache (100%) rename modules/openapi-generator/src/main/resources/{ruby => ruby-client}/version.mustache (100%) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 67ad05336267..e53f064098bd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -81,7 +81,7 @@ public RubyClientCodegen() { apiTemplateFiles.put("api.mustache", ".rb"); modelDocTemplateFiles.put("model_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md"); - embeddedTemplateDir = templateDir = "ruby"; + embeddedTemplateDir = templateDir = "ruby-client"; modelTestTemplateFiles.put("model_test.mustache", ".rb"); apiTestTemplateFiles.put("api_test.mustache", ".rb"); diff --git a/modules/openapi-generator/src/main/resources/ruby/Gemfile.mustache b/modules/openapi-generator/src/main/resources/ruby-client/Gemfile.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/Gemfile.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/Gemfile.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/README.mustache b/modules/openapi-generator/src/main/resources/ruby-client/README.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/README.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/README.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/Rakefile.mustache b/modules/openapi-generator/src/main/resources/ruby-client/Rakefile.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/Rakefile.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/Rakefile.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api_client.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api_client.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api_client_spec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api_client_spec.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api_client_spec.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api_doc.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api_error.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api_error.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api_info.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api_info.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/api_test.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_test.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/api_test.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/api_test.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/base_object.mustache b/modules/openapi-generator/src/main/resources/ruby-client/base_object.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/base_object.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/base_object.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/base_object_spec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/base_object_spec.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/base_object_spec.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/base_object_spec.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/configuration.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/configuration.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/configuration_spec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration_spec.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/configuration_spec.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/configuration_spec.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/gem.mustache b/modules/openapi-generator/src/main/resources/ruby-client/gem.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/gem.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/gem.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/gemspec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/gemspec.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/ruby-client/git_push.sh.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/git_push.sh.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/git_push.sh.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/gitignore.mustache b/modules/openapi-generator/src/main/resources/ruby-client/gitignore.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/gitignore.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/gitignore.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/model.mustache b/modules/openapi-generator/src/main/resources/ruby-client/model.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/model.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/model.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/model_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/model_doc.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/model_doc.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/model_test.mustache b/modules/openapi-generator/src/main/resources/ruby-client/model_test.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/model_test.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/model_test.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/partial_model_enum_class.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_enum_class.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/partial_model_enum_class.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/partial_model_enum_class.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/partial_model_generic.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/rspec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/rspec.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/rspec.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/rspec.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/rubocop.mustache b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/rubocop.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/spec_helper.mustache b/modules/openapi-generator/src/main/resources/ruby-client/spec_helper.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/spec_helper.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/spec_helper.mustache diff --git a/modules/openapi-generator/src/main/resources/ruby/version.mustache b/modules/openapi-generator/src/main/resources/ruby-client/version.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/ruby/version.mustache rename to modules/openapi-generator/src/main/resources/ruby-client/version.mustache From 63aa10801e0bd9c88014c3d350ab4cfa47004add Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 20:58:44 +0900 Subject: [PATCH 11/13] Rename script: ruby-petstore.sh -> ruby-client-petstore.sh --- bin/openapi3/{ruby-petstore.sh => ruby-client-petstore.sh} | 0 bin/{ruby-petstore.sh => ruby-client-petstore.sh} | 0 bin/security/{ruby-petstore.sh => ruby-client-petstore.sh} | 0 bin/windows/{ruby-petstore.bat => ruby-client-petstore.bat} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename bin/openapi3/{ruby-petstore.sh => ruby-client-petstore.sh} (100%) rename bin/{ruby-petstore.sh => ruby-client-petstore.sh} (100%) rename bin/security/{ruby-petstore.sh => ruby-client-petstore.sh} (100%) rename bin/windows/{ruby-petstore.bat => ruby-client-petstore.bat} (100%) diff --git a/bin/openapi3/ruby-petstore.sh b/bin/openapi3/ruby-client-petstore.sh similarity index 100% rename from bin/openapi3/ruby-petstore.sh rename to bin/openapi3/ruby-client-petstore.sh diff --git a/bin/ruby-petstore.sh b/bin/ruby-client-petstore.sh similarity index 100% rename from bin/ruby-petstore.sh rename to bin/ruby-client-petstore.sh diff --git a/bin/security/ruby-petstore.sh b/bin/security/ruby-client-petstore.sh similarity index 100% rename from bin/security/ruby-petstore.sh rename to bin/security/ruby-client-petstore.sh diff --git a/bin/windows/ruby-petstore.bat b/bin/windows/ruby-client-petstore.bat similarity index 100% rename from bin/windows/ruby-petstore.bat rename to bin/windows/ruby-client-petstore.bat From fae350efd8e5aa0eef9953e192511f078a1aa60b Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 21:03:13 +0900 Subject: [PATCH 12/13] Update scripts --- bin/openapi3/ruby-client-petstore.sh | 2 +- bin/ruby-client-petstore.sh | 2 +- bin/security/ruby-client-petstore.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/openapi3/ruby-client-petstore.sh b/bin/openapi3/ruby-client-petstore.sh index 6ffcddaeaab6..76c321582b00 100755 --- a/bin/openapi3/ruby-client-petstore.sh +++ b/bin/openapi3/ruby-client-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 -t modules/openapi-generator/src/main/resources/ruby -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ruby-client-petstore.sh b/bin/ruby-client-petstore.sh index 1fb2ea3c47c0..440929c9a75f 100755 --- a/bin/ruby-client-petstore.sh +++ b/bin/ruby-client-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 -t modules/openapi-generator/src/main/resources/ruby -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/security/ruby-client-petstore.sh b/bin/security/ruby-client-petstore.sh index 2d28613e152e..fb2866970291 100755 --- a/bin/security/ruby-client-petstore.sh +++ b/bin/security/ruby-client-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 -t modules/openapi-generator/src/main/resources/ruby -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore-security-test/ruby $@" +ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/2_0/petstore-security-test.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore-security-test/ruby $@" java $JAVA_OPTS -jar $executable $ags From 13e4d92c05d87a17d29f82a7e0a2a8e5f585bee1 Mon Sep 17 00:00:00 2001 From: "akihito.nakano" Date: Wed, 11 Jul 2018 21:10:58 +0900 Subject: [PATCH 13/13] Update samples - bin/ruby-sinatra-server-petstore.sh - bin/ruby-on-rails-server-petstore.sh - bin/ruby-client-petstore.sh - bin/security/ruby-client-petstore.sh --- .../ruby/.openapi-generator/VERSION | 2 +- .../petstore-security-test/ruby/README.md | 6 +- .../ruby/docs/FakeApi.md | 2 +- .../ruby/lib/petstore.rb | 2 +- .../ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api_client.rb | 2 +- .../ruby/lib/petstore/api_error.rb | 2 +- .../ruby/lib/petstore/configuration.rb | 6 +- .../ruby/lib/petstore/models/model_return.rb | 2 +- .../ruby/lib/petstore/version.rb | 2 +- .../ruby/petstore.gemspec | 2 +- .../ruby-on-rails/.openapi-generator/VERSION | 2 +- .../ruby-sinatra/.openapi-generator/VERSION | 2 +- .../server/petstore/ruby-sinatra/openapi.yaml | 576 +++++++++--------- 14 files changed, 307 insertions(+), 303 deletions(-) diff --git a/samples/client/petstore-security-test/ruby/.openapi-generator/VERSION b/samples/client/petstore-security-test/ruby/.openapi-generator/VERSION index 0628777500bd..dde25ef08e8c 100644 --- a/samples/client/petstore-security-test/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0-SNAPSHOT \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/ruby/README.md b/samples/client/petstore-security-test/ruby/README.md index e6bda2db8899..30ed1f20ebbc 100644 --- a/samples/client/petstore-security-test/ruby/README.md +++ b/samples/client/petstore-security-test/ruby/README.md @@ -2,7 +2,9 @@ Petstore - the Ruby gem for the OpenAPI Petstore */ ' \" =_end -- \\r\\n \\n \\r -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end -- +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end -- + + This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -70,7 +72,7 @@ end ## Documentation for API Endpoints -All URIs are relative to *petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r* +All URIs are relative to *http://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/samples/client/petstore-security-test/ruby/docs/FakeApi.md b/samples/client/petstore-security-test/ruby/docs/FakeApi.md index 8a1ba4a28945..7e6a010b0525 100644 --- a/samples/client/petstore-security-test/ruby/docs/FakeApi.md +++ b/samples/client/petstore-security-test/ruby/docs/FakeApi.md @@ -1,6 +1,6 @@ # Petstore::FakeApi -All URIs are relative to *petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r* +All URIs are relative to *http://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/samples/client/petstore-security-test/ruby/lib/petstore.rb b/samples/client/petstore-security-test/ruby/lib/petstore.rb index 6a0ee148abf2..cff3d1fd9fd5 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb index ca46910658e3..0a96437e3b99 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb b/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb index 91ca28eba796..461681bf3fad 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb b/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb index 60ad3a289712..e121a238044e 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb b/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb index 443bc2845668..01bdd1203620 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end @@ -129,8 +129,8 @@ class Configuration def initialize @scheme = 'http' - @host = 'localhost' - @base_path = '' + @host = 'petstore.swagger.io *' + @base_path = '/ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r' @api_key = {} @api_key_prefix = {} @timeout = 0 diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb index 7d5376a453ce..2751695da3e4 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/lib/petstore/version.rb b/samples/client/petstore-security-test/ruby/lib/petstore/version.rb index 2eeee16e7113..9ae561abf221 100644 --- a/samples/client/petstore-security-test/ruby/lib/petstore/version.rb +++ b/samples/client/petstore-security-test/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/client/petstore-security-test/ruby/petstore.gemspec b/samples/client/petstore-security-test/ruby/petstore.gemspec index 8249b9d2537d..b6248bd12b1b 100644 --- a/samples/client/petstore-security-test/ruby/petstore.gemspec +++ b/samples/client/petstore-security-test/ruby/petstore.gemspec @@ -8,7 +8,7 @@ OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r Contact: something@something.abc */ ' \" =_end -- \\r\\n \\n \\r Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.1.0-SNAPSHOT +OpenAPI Generator version: 3.1.1-SNAPSHOT =end diff --git a/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION index 096bf47efe31..dde25ef08e8c 100644 --- a/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION +++ b/samples/server/petstore/ruby-on-rails/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION index 096bf47efe31..dde25ef08e8c 100644 --- a/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION +++ b/samples/server/petstore/ruby-sinatra/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index 01e572ba924f..c0b60f85ddeb 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -1,29 +1,25 @@ openapi: 3.0.1 info: - title: OpenAPI Petstore description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore version: 1.0.0 servers: - url: http://petstore.swagger.io/v2 tags: -- name: pet - description: Everything about your Pets -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user paths: /pet: - put: - tags: - - pet - summary: Update an existing pet - operationId: updatePet + post: + operationId: addPet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -31,28 +27,22 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} 405: - description: Validation exception content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - post: + summary: Add a new pet to the store tags: - pet - summary: Add a new pet to the store - operationId: addPet + put: + operationId: updatePet requestBody: - description: Pet object that needs to be added to the store content: application/json: schema: @@ -60,115 +50,148 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store required: true responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Pet not found 405: - description: Invalid input content: {} + description: Validation exception security: - petstore_auth: - write:pets - read:pets - /pet/findByStatus: - get: + summary: Update an existing pet tags: - pet - summary: Finds Pets by status + /pet/findByStatus: + get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status + - description: Status values that need to be considered for filter + explode: false in: query - description: Status values that need to be considered for filter + name: status required: true - explode: false schema: - type: array items: - type: string default: available enum: - available - pending - sold + type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid status value content: {} + description: Invalid status value security: - petstore_auth: - write:pets - read:pets - /pet/findByTags: - get: + summary: Finds Pets by status tags: - pet - summary: Finds Pets by tags + /pet/findByTags: + get: + deprecated: true description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags + - description: Tags to filter by + explode: false in: query - description: Tags to filter by + name: tags required: true - explode: false schema: - type: array items: type: string + type: array + style: form responses: 200: - description: successful operation content: application/xml: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array application/json: schema: - type: array items: $ref: '#/components/schemas/Pet' + type: array + description: successful operation 400: - description: Invalid tag value content: {} - deprecated: true + description: Invalid tag value security: - petstore_auth: - write:pets - read:pets + summary: Finds Pets by tags + tags: + - pet /pet/{petId}: - get: + delete: + operationId: deletePet + parameters: + - in: header + name: api_key + schema: + type: string + - description: Pet id to delete + in: path + name: petId + required: true + schema: + format: int64 + type: integer + responses: + 400: + content: {} + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet tags: - pet - summary: Find pet by ID + get: description: Returns a single pet operationId: getPetById parameters: - - name: petId + - description: ID of pet to return in: path - description: ID of pet to return + name: petId required: true schema: - type: integer format: int64 + type: integer responses: 200: - description: successful operation content: application/xml: schema: @@ -176,143 +199,118 @@ paths: application/json: schema: $ref: '#/components/schemas/Pet' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Pet not found content: {} + description: Pet not found security: - api_key: [] - post: + summary: Find pet by ID tags: - pet - summary: Updates a pet in the store with form data + post: operationId: updatePetWithForm parameters: - - name: petId + - description: ID of pet that needs to be updated in: path - description: ID of pet that needs to be updated + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: application/x-www-form-urlencoded: schema: properties: name: - type: string description: Updated name of the pet - status: type: string + status: description: Updated status of the pet + type: string responses: 405: - description: Invalid input content: {} + description: Invalid input security: - petstore_auth: - write:pets - read:pets - delete: + summary: Updates a pet in the store with form data tags: - pet - summary: Deletes a pet - operationId: deletePet - parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 - responses: - 400: - description: Invalid pet value - content: {} - security: - - petstore_auth: - - write:pets - - read:pets /pet/{petId}/uploadImage: post: - tags: - - pet - summary: uploads an image operationId: uploadFile parameters: - - name: petId + - description: ID of pet to update in: path - description: ID of pet to update + name: petId required: true schema: - type: integer format: int64 + type: integer requestBody: content: multipart/form-data: schema: properties: additionalMetadata: - type: string description: Additional data to pass to server - file: type: string + file: description: file to upload format: binary + type: string responses: 200: - description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' + description: successful operation security: - petstore_auth: - write:pets - read:pets + summary: uploads an image + tags: + - pet /store/inventory: get: - tags: - - store - summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: 200: - description: successful operation content: application/json: schema: - type: object additionalProperties: - type: integer format: int32 + type: integer + type: object + description: successful operation security: - api_key: [] - /store/order: - post: + summary: Returns pet inventories by status tags: - store - summary: Place an order for a pet + /store/order: + post: operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: '*/*': schema: $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet required: true responses: 200: - description: successful operation content: application/xml: schema: @@ -320,29 +318,49 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid Order content: {} + description: Invalid Order + summary: Place an order for a pet + tags: + - store /store/order/{orderId}: - get: + delete: + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + in: path + name: orderId + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid ID supplied + 404: + content: {} + description: Order not found + summary: Delete purchase order by ID tags: - store - summary: Find purchase order by ID + get: description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions operationId: getOrderById parameters: - - name: orderId + - description: ID of pet that needs to be fetched in: path - description: ID of pet that needs to be fetched + name: orderId required: true schema: + format: int64 maximum: 5 minimum: 1 type: integer - format: int64 responses: 200: - description: successful operation content: application/xml: schema: @@ -350,157 +368,157 @@ paths: application/json: schema: $ref: '#/components/schemas/Order' + description: successful operation 400: - description: Invalid ID supplied content: {} + description: Invalid ID supplied 404: - description: Order not found content: {} - delete: + description: Order not found + summary: Find purchase order by ID tags: - store - summary: Delete purchase order by ID - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Order not found - content: {} /user: post: - tags: - - user - summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: - description: Created user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Created user object required: true responses: default: - description: successful operation content: {} - /user/createWithArray: - post: + description: successful operation + summary: Create user tags: - user - summary: Creates list of users with given input array + /user/createWithArray: + post: operationId: createUsersWithArrayInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - /user/createWithList: - post: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Creates list of users with given input array + /user/createWithList: + post: operationId: createUsersWithListInput requestBody: - description: List of user object content: '*/*': schema: - type: array items: $ref: '#/components/schemas/User' + type: array + description: List of user object required: true responses: default: - description: successful operation content: {} - /user/login: - get: + description: successful operation + summary: Creates list of users with given input array tags: - user - summary: Logs user into the system + /user/login: + get: operationId: loginUser parameters: - - name: username + - description: The user name for login in: query - description: The user name for login + name: username required: true schema: type: string - - name: password + - description: The password for login in clear text in: query - description: The password for login in clear text + name: password required: true schema: type: string responses: 200: + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string description: successful operation headers: X-Rate-Limit: description: calls per hour allowed by the user schema: - type: integer format: int32 + type: integer X-Expires-After: description: date in UTC when toekn expires schema: - type: string format: date-time - content: - application/xml: - schema: - type: string - application/json: - schema: type: string 400: - description: Invalid username/password supplied content: {} - /user/logout: - get: + description: Invalid username/password supplied + summary: Logs user into the system tags: - user - summary: Logs out current logged in user session + /user/logout: + get: operationId: logoutUser responses: default: - description: successful operation content: {} + description: successful operation + summary: Logs out current logged in user session + tags: + - user /user/{username}: - get: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + in: path + name: username + required: true + schema: + type: string + responses: + 400: + content: {} + description: Invalid username supplied + 404: + content: {} + description: User not found + summary: Delete user tags: - user - summary: Get user by user name + get: operationId: getUserByName parameters: - - name: username + - description: The name that needs to be fetched. Use user1 for testing. in: path - description: The name that needs to be fetched. Use user1 for testing. + name: username required: true schema: type: string responses: 200: - description: successful operation content: application/xml: schema: @@ -508,119 +526,111 @@ paths: application/json: schema: $ref: '#/components/schemas/User' + description: successful operation 400: - description: Invalid username supplied content: {} + description: Invalid username supplied 404: - description: User not found content: {} - put: + description: User not found + summary: Get user by user name tags: - user - summary: Updated user + put: description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username + - description: name that need to be deleted in: path - description: name that need to be deleted + name: username required: true schema: type: string requestBody: - description: Updated user object content: '*/*': schema: $ref: '#/components/schemas/User' + description: Updated user object required: true responses: 400: - description: Invalid user supplied content: {} + description: Invalid user supplied 404: - description: User not found content: {} - delete: + description: User not found + summary: Updated user tags: - user - summary: Delete user - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string - responses: - 400: - description: Invalid username supplied - content: {} - 404: - description: User not found - content: {} components: schemas: Order: - title: Pet Order - type: object + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: - type: integer format: int64 - petId: type: integer + petId: format: int64 - quantity: type: integer + quantity: format: int32 + type: integer shipDate: - type: string format: date-time - status: type: string + status: description: Order Status enum: - placed - approved - delivered + type: string complete: - type: boolean default: false - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + type: boolean + title: Pet Order + type: object xml: name: Order Category: - title: Pet category - type: object + description: A category for a pet + example: + name: name + id: 6 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A category for a pet - example: - name: name - id: 6 + title: Pet category + type: object xml: name: Category User: - title: a User - type: object + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: - type: integer format: int64 + type: integer username: type: string firstName: @@ -634,116 +644,108 @@ components: phone: type: string userStatus: - type: integer description: User Status format: int32 - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + type: integer + title: a User + type: object xml: name: User Tag: - title: Pet Tag - type: object + description: A tag for a pet + example: + name: name + id: 1 properties: id: - type: integer format: int64 + type: integer name: type: string - description: A tag for a pet - example: - name: name - id: 1 + title: Pet Tag + type: object xml: name: Tag Pet: - title: a Pet - required: - - name - - photoUrls - type: object + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: - type: integer format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: - type: string example: doggie + type: string photoUrls: + items: + type: string type: array xml: name: photoUrl wrapped: true - items: - type: string tags: + items: + $ref: '#/components/schemas/Tag' type: array xml: name: tag wrapped: true - items: - $ref: '#/components/schemas/Tag' status: - type: string description: pet status in the store enum: - available - pending - sold - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + type: string + required: + - name + - photoUrls + title: a Pet + type: object xml: name: Pet ApiResponse: - title: An uploaded response - type: object + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message properties: code: - type: integer format: int32 + type: integer type: type: string message: type: string - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message + title: An uploaded response + type: object securitySchemes: petstore_auth: - type: oauth2 flows: implicit: authorizationUrl: http://petstore.swagger.io/api/oauth/dialog scopes: write:pets: modify pets in your account read:pets: read your pets + type: oauth2 api_key: - type: apiKey - name: api_key in: header + name: api_key + type: apiKey