5759 Commits

Author SHA1 Message Date
taqm
3e734a0b54
[docs] Fix go-gin-server additional property docs. (#7188)
* [docs] Fix go-gin-server additional property docs.

* add cli option for serverPort, apiPath

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-24 14:19:23 +08:00
Mohamed EL HABIB
c893b92775
[BUG][MARKDOWN] Extra (back)slashes added to links from Api to Model #6095 (#6834)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-08-24 00:13:17 -04:00
Alex-e
c1de6c2651
[scala][play] Update apiTrait.scala.mustache (#6891)
https://github.com/OpenAPITools/openapi-generator/issues/6889
2020-08-23 23:24:19 -04:00
Jim Schubert
f70d48ea73
[java] Appropriate instantiation of model with dynamic properties (#6052) 2020-08-23 17:41:49 -04:00
ParakhMittal
7bb8a8d9ff
Update apiInvoker.mustache and sample file for akka-scala client for issue #7258 fix (#7259)
* Update apiInvoker.mustache

In scala-akka-client code that is getting generated, addAuthentication method is called after setting headers using header parameter in the below mentioned line
addAuthentication(request.credentials)(
      httpRequest.withHeaders(headers(request.headerParams))
    )

However, in addAuthentication method, we are using withHeaders method that overwrites the headers set using header parameters. So, I am proposing to
change the addAuthentication method be replacing withHeaders() method to addHeader() to add authentication header to the list of already existing headers.

* Update ApiInvoker.scala

Added changes to sample for the client generator code change
2020-08-23 21:42:16 +08:00
sbu
fff5bfe8cb
[Dart] Get all enum values in a list (#7166)
* Provide getter `values` for all enum values

* Add values getter also to inline enum

* Generate samples

Co-authored-by: SimonIT <simonit.orig@gmail.com>
2020-08-23 21:37:52 +08:00
Jim Schubert
0e9c6dd9a8
[ci] Update gitattributes and allow skipping docs generation for Windows CI workflows (#7273) 2020-08-22 22:14:04 -04:00
Jim Schubert
da84d8e3bf
[core][bug] FILES is now path relative with no prefixes (#7271)
* FILES is now path relative with no prefixes

some Java implementations don't honor .relativize documentation fully.
When outDir is /a/b and the input is /a/b/c/d, the result should be c/d.
Some implementations make the output ./c/d which seems to mix the logic
as documented for symlinks. So we need to trim any / or ./ from the start,
as nobody should be generating into system root and our expectation is no ./

This resolves regeneration issues for those on such Java
implementations, although we've not been able to track down the exact
vendor or configurations which might lead to these differences.

* Ensure windows outputs FILES paths in same format

* Normalize FILES paths to remove relativization mid-path
2020-08-22 15:49:00 -04:00
TIm Clark
cbdedff0ad
[Java][jersey2] Add jersey injection dependencies (#7240)
* Adds the jersey injection dependency to gradle and sbt to match
the maven dependency.
* Update jersey version in sbt
2020-08-21 16:51:11 +08:00
Hui Yu
e8e6229d1b
[C][Clang Static Analyzer] Remove the useless variable when assembling URL (#7255) 2020-08-21 16:22:19 +08:00
sbu
f0fd2cbb22
Date format dart (#6389)
* Correct date format of date formatted strings

* Update petstore

* Regenerate samples on linux

* Remove final for letting the user configure custom date formats

Co-authored-by: SimonIT <simonit.orig@gmail.com>
2020-08-21 10:23:44 +08:00
William Cheng
06ab5b5c0f
minor enhancement to java client generator (#7253) 2020-08-21 00:35:26 +08:00
Frank Essenberger
d3017ffba8
typescript: Fix Union Types Import Issue (#6789)
* First approach for discussion

* typo

* add addiotional method

* polish a bit

* remove call of super method

* fix javadoc error

* com.google.common.collect.

* merge master regenerate samples

* sort imports alphabetically

* sort imports alphabetically with right key

* typo

* add type previous imports are still there.

* add type previous imports are still there.

* remove new test to see if they are the problem.

* merge master add tests back in

* align changes which should not lead to failing test but you never know.

* remove formatting changes

* dummy change

* revert spaces

* revert spaces

* revert functional changes

* comment out test

* remove model

* remove interface method

* remove test class completely

* put test class back - test body commented out

* rename test methods

* put back logic and tests

* remove generated APIs

* remark amakhrov

* check in one generated file to test

* adjust call super

* add comment use set.
2020-08-20 15:15:09 +02:00
Troy P
71321bd049
Modifying the es5 and es6 templates for javascript to handle default values (#6649)
for required fields better. This change ensures the required field isn't
overridden with undefined when the object is constructed - especially through
a chain of constructFromObject calls..
2020-08-20 15:24:11 +08:00
spacether
866df36c94
[python-exp] simplify examples (#7157)
* Adds example setting code in python-experimental with one fn setting example values

Fixes sample indentations

Handles composed schema models, object model and arraymodels

Adds brackets in arraymodel input

Sets modelName with map schemas

Removes included_schemas arguments, dicriminator examples do not include property examples

Refactors modelName into toExampleValueRecursive argument

Fixes bug where example models contained themselves

Stops using model ExampleGenerator examples because they are inconsistent with the ones in python-experimental

Uses example values if they exist

Removes single quotes from enum examples

Fixes password example

Adds commented our regex handling, commented out because it breaks

Handles AnyType schema examples

Adds x_example values for simple string properties, uses toExampleValue for all example generation

Adds examples for simple string parameters

Updates comments in toExampleValueBase

Fixes the double nested bug for AdditionalPropertiesWithArrayOfEnums

Fixes bug where NumberWithValidations had double nesting

Updates simple string examples in arrays

Fixes array string examples

Fixes example for string endpoint body example

Adds exampleFromStringOrArraySchema

Adds regex examples, pegs slf4j-version to v1.7.29 for rgxgen

Adds comment about regex seed

Updates pattern matcher to not handle ^ and $

Updates used sample values

Adds ensureQuotes

Adds ensureQuotes

Fixes double quote bug

Updates mustache file

Adds ensureQuotes to key handling

Adds modelNameToSchema map, reduces run time by using it

Fixes java tests

Regenerates python-experimental samples

Fixes python test

* Rebased on master

* Adds getModelNameToSchemaCache

* Updates toDefaultValue to not mutate schemas

* Has all dates and datetimes default and example setting use the same helper function

* Samples regenerated

* indentation tweak, removes txt from sample file
2020-08-19 21:27:31 -07:00
Aljaž Pavišič
c19350b179
Support for KumuluzEE microprofile runtime (#5944)
* Added library and edited generator to support server stub generation with Kumuluzee framework.

* Trimmed and tweaked pom.xml template and removed unnecessary template files from generator and library.

* minor edits

* Added new library to Java client codegen (microprofile-kumuluzee). A
functional KumuluzEE REST client can now be generated.

* Edited README for microprofile-kumuluzee

* Edited docs to include new KumuluzEE library options.

* Updated kee-rest-client client POM dependency version to latest

* fixed pom, edited REAMDE

* Trimmed redundant dependencies from KEE client pom

* Removed unnecessary DefaultGenerator edit, modified config template accordingly.

* Made mp framework an additional property for microprofile instead of being another library option, removed now redundant library files.

* Updated documentation with microprofile framework

* Fixed errors caused by removed functions and variables

* update doc

Co-authored-by: Chuckledog <aljaz.pavsic@gmail.com>
Co-authored-by: Jan Meznaric <jmezna@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-20 10:25:05 +08:00
William Cheng
81d0f72bd5
[C#][netcore] minor improvements and bug fixes (#7244)
* update spec

* fix datetime default value

* fix the issues when the class name is not in pascal case

* Update modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>

* update samples

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>
2020-08-19 22:26:47 +08:00
William Cheng
cf0385676b
Deprecate Flash (ActionScript) client generator (#7231)
* deprecate flash client generator

* update doc

* add doc

* remove left-over doc

* add back flash-deprecated.md

* remove flash.md
2020-08-19 13:53:00 +03:00
Ramanth Addala
ed1e30e75e
feat(csharp): adding retry configuration (#5929)
* feat(csharp): adding retry configuration

* fix(csharp-retry) : adding retry policy through configuration

* fix(csharp): moving RetryConfiguration out of Configuration class

* fix(csharp): minor changes

* fix(csharp): fixing tabs

* fix(csharp): reverting FILES

* fix(csharp) :reverting some file changes

* fix(csharp): reverting changes

* update samples

* fix(csharp-retry) : fixing merge conflicts and build failure

* fix(chsarp-retry) : FILES changes

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-19 18:18:09 +08:00
William Cheng
98c606c32d
Revert "[codegen][Python] Add model cache to speed up code generation (#7220)" (#7245)
This reverts commit bee03685f06ba60cf4ef2677a9b15bbc730e42af.
2020-08-19 14:47:22 +08:00
Sebastien Rosset
bee03685f0
[codegen][Python] Add model cache to speed up code generation (#7220)
* Add modelName to schema cache.

* Add modelName to schema cache.

* add cache optimizations

* add cache optimizations

* remove unused variable
2020-08-18 11:40:49 -07:00
Tatsuro Shibamura
1ff16d0db7
[csharp-netcore] Adding ConfigureAwait(false) using async methods call (#7234) 2020-08-18 13:38:37 +08:00
William Cheng
86240f476b
better wordings for CLASS_MODIFIER (#7233) 2020-08-18 12:52:25 +08:00
alanngloux
5bb27c22ec
[Typescript-redux-query] Fix issue on api template when we have non empty header (#7179)
* Update apis.mustache

* add import

add httpheaders import

* add model httpHeader and remove useless import

* regeneration of sample

* regenerate sample

Co-authored-by: Alann GLOUX <agloux@efront.com>
2020-08-17 11:16:10 +02:00
Sshnyari
528c2f6bd4
[typescript-redux-query] fixed array requests (#7198)
* fixed typescript-redux-query array requests

* switched to a second solution

* regerating typescipt-redux-query samples
2020-08-17 11:14:51 +02:00
William Cheng
b7b009082a
Update csharp-netcore dependencies to the latest stable version (#7194)
* update csharp-netcore dependencies

* update test sdk version

* set tests.sdk version to 15.9.2

* rearrange test

* vs 2019 image

* rollback to v4.61.0

* update Microsoft.NET.Test.Sdk version

* Revert "update Microsoft.NET.Test.Sdk version"

This reverts commit 7a86bfc4151d5d23667129e242ad911db5d33598.

* rollback Microsoft.NET.Test.Sdk
2020-08-17 14:51:31 +08:00
Anthony Rouneau
e26a4222c7
C-Libcurl client: fix enum model generation (#5604)
The "..._parseFromJSON" template was buggy because the name of the _e type used was not the same than the generated.
See the first argument of "..._convertToJSON" to see that the _e type used there was not the same
2020-08-17 09:51:03 +08:00
Yuriy Belenko
9a03850828
[php] Exclude composer.lock in root gitignore (#7224)
* Add samples composer.lock to root .gitignore

composer.lock may produce CI errors when you need to test build against
different PHP versions. However users most likely want to commit this
file, so I think it's better to exclude it only in root .gitignore.

* Commit composer.lock in default PHP templates

* Refresh samples
2020-08-17 00:13:50 +08:00
William Cheng
31d5652c3d
[C++][Cpprest] update cmakelist to fix issue on Linux (#7223)
* fix cmake in linux with cpprestsdk_DIR

* update sample
2020-08-16 22:12:21 +08:00
maschoene
f0e2e372db
avoid 'servers not defined in the spec' warn-spam on maven console (#6837) (#6838) 2020-08-16 13:47:30 +08:00
Jean-François Côté
14c14bf9a2
[Play Framework] Update minor version + scala version + swagger-ui version (#7200)
* Update play framework minor version + scala + swagger-ui + Remove bugs in the url of swagger-ui.

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-15 17:25:30 +08:00
Brendan Burns
554747d59c
Fix a missing return in the C client sslConfig_create function. (#7217) 2020-08-15 10:35:16 +08:00
ryutah
b3b4526bf7
[go-server] Modified go-server templates to allow services to receive http request's context. (#7214)
* adds context arguments to go-server templates (#6657)

* updates go-api-server samples (#6657)
2020-08-15 00:11:44 +08:00
William Cheng
2b0c5819c0
[C#][netcore] auto-generate appveyor.yml (#7212)
* auto-generate appveyor.yml

* Update modules/openapi-generator/src/main/resources/csharp-netcore/appveyor.mustache

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>

* Update modules/openapi-generator/src/main/resources/csharp-netcore/appveyor.mustache

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>

* Update modules/openapi-generator/src/main/resources/csharp-netcore/appveyor.mustache

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>

* Update modules/openapi-generator/src/main/resources/csharp-netcore/appveyor.mustache

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>

* update samples

Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>
2020-08-14 18:55:01 +08:00
William Cheng
208106d179
remove supportsUWP from template (#7211) 2020-08-14 13:30:53 +08:00
William Cheng
85e1fa1b68
remove packages.config.mustache (#7202) 2020-08-14 12:45:39 +08:00
Tatsuro Shibamura
b6f1f0172e
[C#][csharp-netcore] Improvement to standard code format (#7206)
* [csharp-netcore] Improvement to standard code format

* Generate sample clients
2020-08-14 12:26:09 +08:00
William Cheng
dc90adb539
better sync support (#7203) 2020-08-14 11:40:07 +08:00
William Cheng
ae6abfc5f3
better code format (#7197) 2020-08-13 23:45:51 +08:00
Oleh Kurpiak
c9939a2754
[REQ][Java] Additional annotations with String params (#7117)
* Additional annotations with String params

* Additional annotations with String params. Missed sample update

* Additional annotations with String params. Use Jackson annotations

* insert unescaped content

* fix imports

* fix imports
2020-08-12 16:31:03 +08:00
Jon Freedman
9ba34b2805
[Java] parameterize formParams (#5784)
* parameterize formParams

fixes #5782

* sync generated code

* update to latest version of spring, replace MultiValueMap#put with #addAll, remove unused imports

* restore java.util.HashMap import

* update spring version in pom/gradle templates

* re-generate resttemplate samples

* fix test

* fix test

* parameterize an additional usage of LinkedMultiValueMap

* re-generate resttemplate samples

* re-generate webclient samples

* manually edit FILES to replace \ with /
2020-08-12 15:55:53 +08:00
beytun
a1484dac77
[Java] Update templates not to add @Pattern on byte array property (#7153)
* Update Java templates to skip generating @Pattern on byte array properties

* Revert separator changes

* Revert separator changes
2020-08-12 14:29:50 +08:00
TIm Clark
6653cedcc7
[python-experimental] Fix model tests (#7139)
* [python-experimental] Fix model tests

* Fixes model tests to template off the classname instead of
the model's description.
* Uses python-experimental templates when generating
python-experimental samples

* Fix sample file manifest

* Restore remaining tests
2020-08-11 18:38:58 -07:00
TIm Clark
f609120236
[WIP][python-exp] Force camelization of imports (#7186)
* [python-exp] Force camelization of imports

* Add unit test
2020-08-11 14:11:07 -07:00
stgraham2000
b48112d941
Fixes #6942: Added ability to prepend a basePath to typescript-redux-query generators (#6943)
* Added a Configuration object in the Runtime that can be used to update a base path.

Added a new Configuration object that has attributes that can be used to alter the behaviour of the query config generators.  In particular, added a basePath field which can be used to prepend to the urls in the query configs.  The old behaviour only used relative paths for the urls which means cross domain support was not possible.

* Ran script to update the samples after making the template change

Co-authored-by: Steve Graham <stgraham2000@gmail.com>
2020-08-11 11:52:45 +02:00
Masaki Ikeda
13c94eeea0
[Typescript] Import path is invalid in windows. (#7175)
Use `/` instead of `File.Separator`. `File.Separator` is `/` in Windows.
2020-08-11 11:39:43 +02:00
Oleh Kurpiak
c89a5c416d
Fix JaxRS Spec generator additional model types (#7180) 2020-08-11 10:28:38 +08:00
Christian Gibson
d37216a411
[python{,-experimental}] Obey floating point timeouts provided to RESTClientObject.request(...) (#7154)
* [fix] support floating point timeout durations

* [lint] generate samples, rebuild project
2020-08-10 13:11:29 -07:00
Troy P
780b55a518
[Javascript] Fixing the handling of non primitive types in paramToString (#7171) (#7172) 2020-08-10 16:58:55 +08:00
Shinya Sugmoto
256d498d0e
[typescript-node] Fix invalid type when using node@10 and ES5 (#7133)
* replace ClientResponse with IncommingMessage in
mustache

* updated samples

* updated integrationtests
2020-08-10 09:37:13 +02:00