Commit Graph

12022 Commits

Author SHA1 Message Date
William Cheng
1c1c1ef9c3
Fix Kotlin default value (#2513)
* fix kotlin default value

* fix test cases
2019-03-27 14:04:52 +08:00
William Cheng
2ce3574868
Add a link to the article "Access any REST service with the SAP S/4HANA Cloud SDK" (#2520)
Add a link to the article "Access any REST service with the SAP S/4HANA Cloud SDK"
2019-03-27 10:26:37 +08:00
Mathieu Lemoine
81c57eefd5 [BUG][Kotlin Client] API using case other than camelCase not generated properly (#2391)
* Add Json import for all data classes

* Add `@Json` annotation for data class required variables

* Add `@json` annotation for data class optional variables

* Update samples code (petstore, strings, threetenbp)

* Fix annotation to match Kotlin coding style
2019-03-27 09:59:39 +08:00
Michael Stummvoll
6e7c621629 Fix JavaDoc errors in ApiClient for resttemplate (#2515) 2019-03-27 09:58:56 +08:00
Jaumard
41b5d0e8fc [Dart][Jaguar] and proto serialization support (#1793)
* add proto format support for jaguar generator

* Add openApiType to CodegenProperties
Finish proto generation
2019-03-27 09:48:09 +08:00
William Cheng
09d27e82e7
Minor enhancements to Scala Play server generator (#2512)
* minor enhancements to openapi-generator

* update doc

* remove oudated doc
2019-03-27 09:47:47 +08:00
William Cheng
393f5e499e
Add link to the article "OpenAPI generatorを試してみる" (#2517)
Add link to the article "OpenAPI generatorを試してみる"
2019-03-27 09:44:23 +08:00
Vincent Devos
d795c4e9d0 [TypeScript Client] fix npm version when snapshot is true and npmversion is snapshot too (#2401) 2019-03-27 00:03:24 +08:00
Jérémie Bresson
01e8c67da9
Add rule to maven-enforcer-plugin to prevent usage of SNAPSHOT versions (#2509) 2019-03-26 15:05:49 +01:00
William Cheng
d4244be654
fix scala akka return type (#2510) 2019-03-26 18:54:09 +08:00
William Cheng
5a6f4cb4a9
Update Java Vertx client dependency (#2507)
* update java vertx client dep

* update java client description

* update sample
2019-03-26 18:52:34 +08:00
Andy Bao
5d05cc0e66 Fix body serialization in javascript-flowtyped generator when body is falsy (#2499) 2019-03-26 18:23:23 +08:00
Adi Gerber
28ae33cb13 New generator - Scala Play Framework (#2421)
* Added new generator for Scala + Play Framework (WIP)

* scala-play-framework: default values reintroduced (mostly); datatype -> dataType

* reintroduced missing EOF newline

* Support single/collection params for header/query params

* Rename apiFutures > supportAsync, implStubs > skipStubs (opt-out instead of opt-in)

* Deleted license and small fixes

* Generate extraction of form parameters from request body

* Added missing call to executeApi for unit methods when supportAsync=false

* Polished some stuff and added routes, application.conf, logback.xml, better default responses

* Disabled generation of Json.format for models with files

* Added README

* Multiple additions and improvements.

- Fix Indentation using mustache lambdas
- Option to set routes file name (default: routes) - allows uninterrupted manual maintenance of main routes file, which may include a subroute to the generated routes file
- Move supporting file classes to a package and update application.conf generation accordingly
- Option to generate custom exceptions (default: true) which are used in the controller to differentiate between API call exceptions and validation exceptions
- Generate error handler with basic exception mapping
- Option to generate API docs under /api route
- Reorder routes file so parameter-less paths are given priority over parameterized paths. Prevents case like /v2/user/:username activating before /v2/user/login (thus shadowing the login route completely) as observed using v3 petstore.yaml
- Option to set base package name (default: org.openapitools) to allow placing supporting files under a different package

* Revert supportAsync default to false

* Added binaries and default api/model packages

* Added scala-play-framework sample

* Add missing contextPath to README and controller comment
2019-03-26 16:04:48 +08:00
dragosnutu
9e391efd1d [#2442] - implement yamlsample config help output; (#2443) 2019-03-26 15:22:59 +08:00
Jim Schubert
173ae6f368 Remove gradle portal for snapshot publish, as the portal does not overwrite previous snapshots 2019-03-25 22:15:50 -04:00
Jim Schubert
7af272a249 Include system properties for gradle publishing 2019-03-25 21:24:49 -04:00
Jim Schubert
879d47ccd0 [gradle] Sign on gradle portal plugin publishing 2019-03-25 20:42:44 -04:00
William Cheng
65e36e8369 Merge branch 'master' of https://github.com/openapitools/openapi-generator 2019-03-25 22:45:18 +08:00
William Cheng
f015363dbd update samples 2019-03-25 22:44:05 +08:00
Gocha Ossinkine
3677bdcfc7 Replace deprecated Controller with new one (#2146) 2019-03-25 22:07:40 +08:00
Alok Prateek
3810d12086 [#2441] Update documentation mustache templates for proper linting. (#2458)
* [#2441] Update documentation mustache files for PHP client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for ruby client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for javascript client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for Java client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for GO client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for Rust client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for C# client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* [#2441] Update documentation mustache files for Android client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
Issues with generated markdown files as reported by markdownlint for node.js are:

- MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
- MD002 first-heading-h1/first-header-h1 - First heading should be a top level heading
- MD007 ul-indent - Unordered list indentation
- MD009 no-trailing-spaces - Trailing spaces
- MD010 no-hard-tabs - Hard tabs
- MD011 no-reversed-links - Reversed link syntax
- MD025 single-h1 - Multiple top level headings in the same document
- MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
- MD032 blanks-around-lists - Lists should be surrounded by blank lines
- MD040 fenced-code-language - Fenced code blocks should have a language specified
- MD041 first-line-h1 - First line in file should be a top level heading

* Update README.mustache

* [#2441] Update documentation mustache files for Ada client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]

* [#2441] Update documentation mustache files for Apex client

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]

* [#2441] Update documentation mustache files for bash

This commit fixes issues with Markdown/CommonMark parsing by linting and enforcing consistent style.[#2441]
2019-03-25 21:48:22 +08:00
Jochen Scheib
c918d7ad64 go-server: Support additional properties as command line arguments (#1555)
* Support additionalPorperties as command line arguments

* Move Readme into main dir

* Update Mustache

* Update sample

* Test coverage

* Move cli options

* Revert options

* Remove tabs

* openapi 3 examples

* Update readme

* serverPort to int

* Move package version cli option to AbstractGoCodegen

* Update samples

* Tab to spaces

* Update docs and sample with xml

* Manual update doc

* Another doc try

* Regenerate go-gin-server doc
2019-03-25 21:19:06 +08:00
William Cheng
5346eb4c34
Add a link to Qitta blog post on OpenAPI Generator (#2497)
Add a link to Qitta blog post on OpenAPI Generator
2019-03-25 13:13:41 +08:00
William Cheng
3e065db2c6
better operation id handling in scala generators (#2490) 2019-03-25 13:13:09 +08:00
Joël Vimenet
5074f4d9c5 Update akka scala generator (#2472)
* Update akka scala generator

* Upgrade scala version to 2.12.8
* Upgrade Akka version
* Migrate from spray to Akka HTTP

* Update client sample

* Fix pom.xml generation to be equivalent to build.sbt
2019-03-25 13:12:56 +08:00
Jim Schubert
df0d53795c
Publish to gradle plugin prior to sonatype (#2496) 2019-03-24 22:19:19 -04:00
William Cheng
3b017c59f1
Add better example code for R object (#2492)
* add better example for r object

* better code format
2019-03-24 23:21:31 +08:00
William Cheng
e0caa6fd66
better code format for kotlin, python (#2491) 2019-03-24 21:45:33 +08:00
Thibault Duperron
0935f5345d Kotlin model name camelize (#2430)
* Kotlin model name camelize

* Update samples
2019-03-24 10:47:05 +08:00
Tom Ghyselinck
f7943257c5 Python flask pythonic params (#2374)
* Using connexion `pythonic_params` support while keeping OpenAPI spec file correct with reference to the original spec file.

* - Add `camelCase` query parameter which shows the incorrectnes of the conversion of the OpenAPI spec file in Python server implementation(s).

* Also use `pythonic_params=True` for the `python-aiohttp` implementation.

* - Updated Python related samples.

* The unit tests must provide the correct query parameters.

* - Updated Python related samples.
2019-03-24 10:36:26 +08:00
Akira Tanimura
033ab8a6f5 [Ruby] Use Integer instead of Fixnum in Ruby client (#2475) (#2481)
* use Integer instead of Fixnum in Ruby client (#2475)

* update samples (#2475)
2019-03-23 18:48:10 +08:00
davidwcarlson
1adc962f2b java-jersey2 - Always render setBearerToken regardless of whether OAuth2 is in use. (#2479) 2019-03-23 18:38:00 +08:00
Akira Tanimura
94c267ee42 [Ruby] Auto recreate directories in Ruby samples (#2476)
* purge lib, doc, spec directories before generate Ruby client sample

* update Ruby client samples
2019-03-23 18:35:47 +08:00
vtitov
4a7dfecf24 Bugfix/maven classpath schema (#2409)
* multi-module example for maven plugin master

* read byte source from classpath like swagger-parser does

* renamed schema to openapi.yaml for multi-module examples

* renamed schema to openapi.yaml for multi-module examples
2019-03-23 18:34:04 +08:00
Jan Buchar
db1b63780d Add return type declaration to typescript-fetch runtime (#2466)
* Add return type declaration to typescript-fetch runtime

closes #2461

* Regenerate samples
2019-03-22 14:42:31 +08:00
Vincent Devos
e3716262e5 [Kotlin client]fix warning when else all covered (#2470) 2019-03-22 14:40:14 +08:00
Gaurav Yadav
ee75366051 Added proxy headers option for urllib3 (#2467)
* adding headers option to pass in rest client

* running ensure uptodate
2019-03-22 11:22:10 +08:00
Hector Jusforgues
d839af5b1e [typescript-axios] Fix JSON serialization of falsy request bodies (#2446)
* [typescript-axios] Fix JSON serialization of falsy request bodies

Fix #2445

* [typescript-axios] update petstore samples
2019-03-22 10:57:53 +08:00
William Cheng
2e777c04d4
Better handling of operationId with slashes (#2469)
* better handling of operation id with slashes

* update smaples
2019-03-22 10:41:53 +08:00
Justin Black
b1955f3517 Adds exceptions module to python clients (#2393)
* Adds python client exceptions module and updates samples

* Adds python style updates, detects integers in exception paths with six

* Updates to ruby samples which circleci needs

* Removes petstore-security-tests samples

* readme char removal (triggers ci tests)

* Readme fix, triggers CI tests

* Updates python client sample
2019-03-22 10:40:32 +08:00
Gaurav Yadav
45ad72b032 Adding retries option to override default value 3 of urllib3 (#2460)
* adding retries option to override default value 3 of urllib3

* running petstore for python

* adding files for samples in petstore run

* running ensure-up-to-date
2019-03-22 08:24:23 +08:00
William Cheng
2101780a09
test kotlin in shippable (#2465) 2019-03-22 07:58:23 +08:00
Kevin Smith
1a19edb0e5 Add build script and remove babel (#2439)
* Add build script and remove babel

This change adds a build script which uses babel to transpile generated es6 source to es5, such that it can then be used in node projects or published as a package to npm. The `babel` package is also removed as it is deprecated, and superseded by `babel-cli`.

See https://github.com/OpenAPITools/openapi-generator/issues/2126#issuecomment-473926663

* update samples
2019-03-21 22:36:56 +08:00
Kevin Turner
2f8e4fe32b [TypeScript][Node] async promises and imports (#2452)
* async promises and imports

* Sample regen

* Correct licence info

* update samples
2019-03-21 22:27:38 +08:00
Akihito Nakano
77545df80d Add RuboCop to Gemfile (#2464)
* Add Rubocop

* Update samples

./bin/openapi3/ruby-client-petstore.sh
./bin/ruby-client-petstore.sh
2019-03-21 22:00:08 +08:00
john lilley
dc78405a68 1391 jel minimal overwrite option (#2451)
Option to overwrite only changed files
2019-03-21 00:17:10 +08:00
William Cheng
fef2970dab commnet out kotlin client jdk7 test 2019-03-20 23:47:44 +08:00
William Cheng
522ccee7f3 remove publishPlugins 2019-03-20 22:40:53 +08:00
William Cheng
d32564da51 comment out kotlin tests 2019-03-20 22:34:49 +08:00
Michael Ramstein
49f3e9a355 [Elixir] Deserialize responses based on status code (#2355)
* Update Tesla dependency and replace Poison with Jason

* Use new Tesla method to set headers

* Fix jason dependency definition

* Use list for Headers instead of a map

* Rollback to Poison because Jason does not support 'as:' option to decode to arbitrary struct

* Use new return signature from Tesla 1.0 in decode function

* catch error when a struct is given as second parameter to RequestBuilder.decode

* Update modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Co-Authored-By: yknx4 <yknx.4.b@gmail.com>

* Update modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Co-Authored-By: yknx4 <yknx.4.b@gmail.com>

* Evaluate response based on status code

* Generate Petstore

* pin poison to ~> 3.0.0 since 4.0.0 does not work atm

* run ./bin/openapi3/elixir-petstore.sh
2019-03-20 21:35:50 +08:00