1230 Commits

Author SHA1 Message Date
William Cheng
931c4e361f update samples 2020-10-10 17:10:32 +08:00
Maksym Melnychok
8416fff568
[python-experimental] implement in operator for model classes (#7637)
* implement  operator for model classes

* refresh samples
2020-10-09 10:38:15 -07:00
William Cheng
fe31b9e2ce
java jersey2: remove trailing whitespaces (#7632) 2020-10-09 17:11:23 +08:00
Justin Black
bbf9c30c7a
Runs ensure up to date (#7622) 2020-10-07 19:21:06 -07:00
Justin Black
1c3d6e5e6f Revert "Adds ensure-up-to-date changes'"
This reverts commit 5fce12321e408b97d6f43b05a0edd3967a1ef4c0.
2020-10-07 19:09:38 -07:00
Justin Black
5fce12321e Adds ensure-up-to-date changes' 2020-10-07 19:03:39 -07:00
Kuzma
4e5ecf271a
[Python] correct return types if multiple responses are defined (#7427)
* update python mustache templates

* bug fix

* rm response_type

* generated samples

* resolve conflict

* samples

* set None if a type is empty

* regenerated samples
2020-10-03 08:37:08 -07:00
William Cheng
a287c51b97
update default faraday versions (#7538) 2020-10-02 18:46:49 +08:00
Slavek Kabrda
336521b464
[Python-experimental] Don't mandate passing in required value as argument (#7424)
* [Python-experimental] Don't mandate passing in required value as argument

* Remove usage of have_value

* Address additional review comments

* Fix tests according to the code change

* Does not set None as value initial value, removes hasRequired tag usage, updates docstring

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2020-09-29 10:56:52 -07:00
Bodo Graumann
54dd18535a
[typescript] Fix generation of enum models (#7529)
This fixes #665 for the consolidated typescript generator.
Original fix for typescript-node was in PR #2266, merged as
8417c5bed0e23764dc841816c2322cf7dc4e9b0d in version 4.1.0.
2020-09-28 16:28:08 +02:00
William Cheng
d7dfcc20c0
Add server URL without variables to the test spec (#7517)
* add server url without variables to the test spec

* fix php tests

* fix tests

* fix assertion
2020-09-28 22:06:42 +08:00
Hippolyte HENRY
9ba943318a
[go][client] Fix API docs example generation (#7489)
* [go][client] Fix API docs example

* Generate samples
2020-09-25 14:45:18 +08:00
Jim Schubert
f3fbc7d782
[ci][test] Fix samples (#7509) 2020-09-24 23:42:04 -04:00
Hippolyte HENRY
7b1563326a
[ruby] Fix generation when generateAliasAsModel is enabled (#7419) 2020-09-24 22:08:57 -04:00
Jim Schubert
49760f7a34
[sonar][ci] Fixes some new recommended "bug" fixes found via Sonar (#7508) 2020-09-24 22:02:11 -04:00
William Cheng
596bbb9c58
Add option to set recursion limit (#7491)
* add option to set recursion limit

* fix test failure

* update doc

* add tests

* add missing import

* rename option to recursionLimit
2020-09-24 11:47:22 -07:00
Jiri Kuncar
bc799b2488
[ruby] Support for per-operation servers (#7415)
* Support server configuration per operation

* regenerated+tests

* base_url fix

* support not templated urls

* revert update of ruby docs
2020-09-24 11:21:43 -04:00
William Cheng
8c78f13a41
remove hardcoded PetApi (#7483) 2020-09-22 11:45:29 -07:00
Jim Schubert
a29d9a9ff4 [samples] Regenerate 2020-09-20 23:27:48 -04:00
spacether
35d42728d9
Adds free form model generation in python-experimental (#7373)
* Adds free form model generation in python-experimental

* Adds hasValidation property to codegenModel

* Adds separate variable val

* Samples regenerated

* Updates test_some_object.py

* Adds two more boolean conditions

* Runs ensure up to date

* Updates tests to check that models are or are not generated

* Removes unused import

* Updates model names in java test

* Removes unneeded test

* Cleans up tests
2020-09-20 10:55:54 -07:00
Nicholas Muesch
32c591d9a7
Support multiple api keys in python example documentation (#7417)
* Support multiple api keys in config option

* Regenerate samples

* Update rest of examples
2020-09-15 13:40:48 -07:00
Slavek Kabrda
be40dbe540
[Go][client] Re-add deleted model template files (#7423)
* [Go][client] Re-add deleted model template files

* Regenerate samples
2020-09-15 22:25:45 +08:00
William Cheng
8fad36c898
[Go] minor format change, deprecate "withGoCodegenComment" option (#7375)
* use tab in comment, remove withGoCodegenComment

* deprecated option
2020-09-12 22:05:10 +08:00
Ryan Rishi
2d5b2726d0
Subclass Python exceptions (#7321)
* Subclass Python exceptions:
- UnauthorizedException (401)
- ForbiddenException (403)
- NotFoundException (404)
- ServiceException [500 - 599]

Fixes #2151

* add generated sample code

* use Python 2 flavor inheritance

* regenerate samples
2020-09-05 10:22:04 -07:00
William Cheng
2fd23f505e
Prepare 5.0.0-SNAPSHOT (#7347)
* Revert "Prepare 5.0.0-beta2 release (#7345)"

This reverts commit 212b4f784742744b7b238607dcefb23ec9db64d7.

* update readme
2020-09-04 15:31:54 +08:00
William Cheng
212b4f7847
Prepare 5.0.0-beta2 release (#7345)
* update version

* update doc

* update samples
2020-09-04 13:03:45 +08:00
William Cheng
14d41310b9
[Go] replace go generator with go-experimental generator (#7337)
* replace go with go-experimental

* update samples

* extends with abstract go class

* rearrange

* remove deprecated

* minor fix

* remove go deprecated samples

* update pom, clean up samples

* mark generator as deprecated
2020-09-04 09:56:42 +08:00
Jim Schubert
a6d30cac9d
[core] Templating: limit compilation to supported extensions and constrain target paths (#6598) 2020-09-02 15:52:35 -04:00
William Cheng
966b87e66c
add aws v4 signature support to go-experimental (#7326) 2020-09-02 15:28:22 +08:00
William Cheng
d50d31cd5e
add structPrefix support to go-experimental (#7327) 2020-09-01 20:51:37 +08:00
Arvind Thirunarayanan
ab5b0fa8d4
[Go]: Interface definitions for api functions (#5914)
Introduces a new "generateInterfaces" option, allowing for better testability of generated clients
2020-08-31 21:43:40 -04:00
Oleh Kurpiak
14a500c6fe
[Java][Client] Use java8 OffsetDateTime for clients (#7190)
* use java8 OffsetDateTime for clients

* use java8 OffsetDateTime for clients

* fix javadoc

* add javadoc to JavaTimeFormatter.mustache

* add javadoc to JavaTimeFormatter.mustache

* add javadoc to JavaTimeFormatter.mustache
2020-08-31 22:31:28 +08:00
QP Hou
30074833cd
fix http bear auth documentation for go clinets (#7312) 2020-08-31 13:43:34 +08:00
Jiri Kuncar
d5a680e85f
[Extensions][Go][Java] Test x-auth-id-alias (#6642)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-08-30 21:46:55 -04:00
William Cheng
26c17c5774
[Java] remove deprecated jackson classes (#7304)
* [java/resttemplate] Generate valid code if no Authentication implementations present

Take the logic used to decide which instances to add to the authentications map and re-use to not import classes or offer non-functional util methods

* parameterize formParams

fixes #5782

* replace use of ISO8601DateFormat and ISO8601Utils with StdDateFormat

fixes #5779

* add constructor to intialise calendar

* Revert "[java/resttemplate] Generate valid code if no Authentication implementations present"

This reverts commit 6e450907bae1d831a4a8c9b66f6b707424f0a39a.

* Revert "parameterize formParams"

This reverts commit 7a26ce5dd21ce147ed33728cd0091a29175367a4.

* also override single arg parse method to avoid throwing exception

* also override single arg parse method to avoid throwing exception

* update samples

* update samples

* fix jersey1 tests

* fix jersey2 test

* update resteasy dependencies

* fix java jersey2 oas3 tests

* use java8 in springboot-beanvalidation

Co-authored-by: Jon Freedman <jon.freedman@zoho.com>
2020-08-27 23:13:56 +08:00
William Cheng
8c1f6fcdc1
[Java][jersey2]Support enum discriminator value in child objects (#7267)
* support enum discriminator value in child (java jersey2)

* update samples

* add tests, use public
2020-08-27 11:42:48 +08:00
Niels Pardon
d868fd6dc8
[Java][clients] remove java.lang prefix from Object (#6806) 2020-08-24 22:06:19 -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
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
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
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
William Cheng
1ee57ea853
[C#] Switch the spec to OAS v3 from v2 (#7176)
* switch to 3.0 spec in c# clients

* remove samples/openapi3/client/petstore/csharp

* remove samples/openapi3/client/petstore/csharp-netcore/OpenAPIClient

* remove samples/openapi3/client/petstore/csharp-netcore/OpenAPIClientCore/

* update samples
2020-08-10 20:48:13 +08:00
William Cheng
4a7c4ac81d
add helper methods to anyOf in java models (#7130) 2020-08-06 15:12:44 +08:00
William Cheng
c1b8c294aa
[Java][jersey2] Add helper methods for oneOf Java classes (#7115)
* add helper methods for oneOf java class

* better test comment
2020-08-05 10:27:38 +08:00
Nathan Mische
b8e87bb6fc
Update to reset httpRepsonse.Body (#6948)
* Update to reset httpRepsonse.Body such that is available to client consumers via the returned httpResponse variable.

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-08-04 10:34:41 +08:00
Jim Schubert
7a846a193a
[bug][core] Copy all attributes (not properties) on composed schemas when flattening models (#7106) 2020-08-03 21:16:47 -04:00
Yuriy Belenko
6a08ec59c0
[core] Add type and format properties to model of inline response (#6153) 2020-08-03 18:37:37 -04:00
William Cheng
a9576a1e2b
fix http signaure auth in build.sbt (#7110) 2020-08-03 10:10:47 +08:00
TIm Clark
800d9453a4
[Java][jersey2]Fix gradle HttpSignatureAuth dependencies (#7096)
* Corrects tag for including HttpSignatureAuth in gradle builds
* Updates version of org.tomitribe:tomitribe-http-signatures in
gradle template to match version from maven template
* Updates samples
2020-08-02 16:18:44 +08:00
William Cheng
a7ccc4addd
[Go][Exp] better code format (#7088)
* go-exp-format

* replace spaces with tabs
2020-08-01 10:12:28 +08:00