9299 Commits

Author SHA1 Message Date
William Cheng
25b55c8c2e
remove jdk 6 support (#11558) 2022-02-10 11:24:40 +08:00
William Cheng
3cb4b7d08e
[Java] remove tabs from java templates (#11557)
* remove tabs from java templates

* replaces tabs with spaces in java templates
2022-02-10 10:47:08 +08:00
William Cheng
8455c1cd23
Remove the option to support JDK7 from Java generator and templates (#11547)
* remove java8 from java client generator and templates

* update tests

* remove threetenbp

* update spring templates to remove java8

* remove java8 from jaxrs template

* fix jaxrs spec

* fix feign

* remove CustomInstantDeserializer.java

* fix jersey1

* fix undertow

* various update

* fix jaxrs jersey1

* fix java inflector

* fix jaxrs cxf

* add new files

* update doc
2022-02-10 10:35:29 +08:00
Bruno Coelho
441c069177
[Swift5][client] try to fix JsonEncondable (#11541) 2022-02-09 08:50:16 +00:00
Boris Smidt
ff30df92f8
Upgrade sttp generator to sttp3 (#11260)
Remove CIRCE_VERSION from generator because it is taken in as a transitive dependency of `  "com.softwaremill.sttp.client3" %% "json4s" % "3.3.18"`

Co-authored-by: boris <borissmidt@hotmail.com>
2022-02-08 13:46:42 +08:00
William Cheng
b6c445cdc3
update swagger core, jackson to newer version (#11545) 2022-02-08 13:31:20 +08:00
William Cheng
7c1f6c5d6a
update build.gradle, build.sbt in java okhttp-gson client (#11543) 2022-02-08 10:57:58 +08:00
William Cheng
51800471fa
[java][Okhttp] replace okhttp-gson with okhttp-gson-nextgen (#11538)
* replace okhttp-gson with okhttp-gson-nextgen

* add new files

* update doc

* clean up pom

* update test

* restore error handling in doc

* add back changes

* uncomment tests

* update samples
2022-02-08 00:05:44 +08:00
Jason Finch
dbb63dc077
tidy [csharp-netcore]: Remove unused UrlEncode method. Possible breaking change: Method is public so upstream consumer *may* of used it, but library does not. (#11453) 2022-02-07 15:18:24 +08:00
Ethan Keller
9f5422d688
Add cycle detection (#7532) (#11500)
* Add cycle detection (#7532)

* Review feedback

* Including ContextAwareNodes to detect cycles more accurately.

* Add test

* Add forest to test.

* No longer need ContextAwareNode

* Review feedback

* Update samples
2022-02-06 13:21:17 -05:00
devhl-labs
fcce44ab9b
[csharp-netcore] Add generichost samples (#11451)
* added generichost samples

* build samples

* added guid

* build samples
2022-02-05 17:53:26 +08:00
cachescrubber
194b3fda26
[Bug][Java/Spring] OAS3 related bugfixes and enhancements (#11526)
* Content mediatype is hardcoded in api.mustache #11511

* Generate Samples

* OAS3 incorrect data type when providing a default value #11367

* Generate Samples

* Fix JsonTypeName annotation handling in Java and JavaSpring

* Generate Samples

* getIsClassnameSanitized: use null safe equals
2022-02-05 17:29:58 +08:00
William Cheng
e177a4b757 update samples 2022-02-05 16:37:56 +08:00
William Cheng
e2d32b2061
fix javadoc warnings in feign client (#11527) 2022-02-05 15:18:36 +08:00
William Cheng
31f2f11beb update samples 2022-02-05 14:47:51 +08:00
ruijlpires
92ccb629e9
Fix duplicated Authorization headers when renewing a token on a retry (#11513)
Add a leeway time to avoid a skew in the local clock
2022-02-05 14:28:05 +08:00
Justin Black
6cf4e79f14
[python-experimental] adds missing bases, performance improvements (#11517)
* Adds bases for int32, int64, float32, and float64

* Samples updated

* Removes print statements

* When creating properties and items do not call _from_openapi_data or model __new__

* Update speed improvement

* cast_to_allowed_types speeed improvements

* _get_new_instance_without_conversion order swap for speed

* Fixes test errors

* Small fixes about path_to_schemas
2022-02-04 07:47:16 -08:00
y-tomida
7843a45b89
[TypeScript] Fix type array with uniqueItems (#11515)
* fix type mapping

* add missing primitive type Set

* add testcase

* generate new samples

* update typescript generator document

* regenerate samples and documents
2022-02-04 08:04:51 +01:00
Justin Black
4d9a500c95
Adds inline composition examples to python-experimental (#11420)
* Adds component with composition in property example

* Adds endpoint parameter examples

* Adds request body examples

* Adds inpline composition example in response body

* Fixes UNKNOWNBASETYPE import bug

* Updates allof inline schemas to be type object with minProperties

* Removes newline

* Adds test_ObjectWithInlineCompositionProperty

* Updates inline schema to be type string, adds partial test_inline_composition

* Fixes accept_content_types input value

* Adds test_ObjectWithInlineCompositionProperty, adds test_inline_composition and starts deserialization of multipart

* Fixes test_inline_composition, adds simple multipat/form-data deserialization
2022-02-03 08:27:52 -08:00
Bernd Hacker
dc1df25f29
[typescript-rxjs] add rxjs 7 support (#9958)
* feat(typescript-rxjs): add support for rxjs 7.2.0, use type imports

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): use generic T instead of any in BaseAPI

* feat(typescript-rxjs): regenerate samples
2022-02-03 09:52:01 +01:00
Kasper Peulen
80082c73c4
Typescript-fetch: date is only converted to javascript date with runtime checks enabled (#11481)
* date is only converted to javascript date with runtime checks enabled

* fix test

* fix test
2022-02-02 07:50:45 +01:00
cghislai
95c996f866
Revert supports for delete body in typescript-angular client (#10976)
* Update generated angular 12 client version

* Revert "Delete body angular (#10751)"

This reverts commit edb88d919381d56a4ff885030f9b0e6f43b2898c.

* Update generated files
2022-01-31 07:53:07 +01:00
William Cheng
0e1164ff6b Merge remote-tracking branch 'origin/6.0.x' 2022-01-31 14:26:14 +08:00
William Cheng
4a36be7002
Prepare 5.4.0 release (#11457)
* prepare 5.4.0 release

* update gradle tests
2022-01-31 13:04:25 +08:00
cachescrubber
b261b29efb
[Java/Spring] Revert to fully qualified import for org.springframework.core.io.Resource (#11461)
* Revert to fully qualified import for org.springframework.core.io.Resource

* Generate Samples
2022-01-31 11:14:34 +08:00
Armel Soro
ed14ce4dec
[Kotlin] Use mutable container types when 'modelMutable' is enabled (#11154)
* [Kotlin] Use Mutable container types when 'modelMutable' is enabled

* Generate sample 'kotlin' project with mutable models

* Generate sample 'kotlin-server' project with mutable models

* Generate sample 'kotlin-vertx' project with mutable models

* Generate sample 'ktorm-schema' project with mutable models

Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
2022-01-30 12:06:03 +00:00
William Cheng
c8b84c4d03 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-30 18:01:35 +08:00
William Cheng
3ed6343933
remove deprecated options in java client generator (#11456) 2022-01-30 15:57:02 +08:00
William Cheng
8b017bc855
mark csharp-nancyfx generator as deprecated (#11454) 2022-01-30 15:53:27 +08:00
William Cheng
35fea62b3b
[c#][netcore] mark EOL frameworks as deprecated (#11450)
* removed old frameworks from csharp-netcore

* removed another reference and build samples

* updated readme

* deprecated frameworks

* fix test csproj file

* update doc

Co-authored-by: devhl-labs <shawnkanyer@gmail.com>
2022-01-30 02:01:26 +08:00
y-tomida
088c65c9c6
[typescript-axios] Add stringEnums option (#11368)
* add stringEnums option

* update templates

* add export

* update samples

* update document

* improve readability

* remove unnecessary code

* add config file for sample

* add sample

* update sample

* remove enum variable form modelObjetEnum template because this variable is not used in modelStringEnum template.

* change the indentation to be the same as modelGeneric template
2022-01-29 08:07:30 +01:00
William Cheng
b901f11e85
use encode_path instead in crystal (#11439) 2022-01-29 14:01:27 +08:00
Chao Yang
3f0f92fb65
[crystal][client] Make optional properties nillable in models (#10723)
* Add nillable data types to models

Only REQUIRED and NOT NULLABLE variables can NOT have type Nil
All OPTIONAL and NULLABLE-REQUIRED variables have type Nil
Only NULLABLE-REQUIRED variables should emit keys with null values when they are serialized, json example: property name : String? = nil; the json representation for this property is {"name": null}
For all OPTIONAL variables having Nil values, their variable keys would be skipped during serialization. The json representation for OPTIONAL property name : String? = nil;  would be: {}

* Fix failed tests in samples/client/petstore/crystal/spec/api/pet_api_spec.cr

* Remove isNullable from model template

* No need to check nillability of required property

For any required property, assigning nil value to it will result in compilation error
The datatype simply can not hold value nil, so there's no need to check it

* Place required vars first in initializor

* Refresh generated sample code for crystal client

* Required properties are not nillable

* Fix compilation error of undefined method equal?

Crystal lang doesn't have method equal?
We should use method same? instead of ruby's equal? method

Reference: https://crystal-lang.org/api/master/Reference.html#same?(other:Reference):Bool-instance-method

* Add tests for add_pet api endpoint with only required parameters

Setting Pet optional properties to nil values is allowed by add_pet api endpoint

* Add helper method to test compilation errors

* Add tests to Pet model

Test model initializations
Test compilation error when model is initialized without required properties

* Test required properties in json deserialization for Pet model
2022-01-29 10:55:44 +08:00
Antti Leppä
7dad57c8b6
[kotlin-server][jax-rs] Added support for JAX-RS library into Kotlin Server generator (#10830)
* Added templates for Kotlin JAX-RS server

* Fixed Kotlin Server JAX-RS template directory

* Added support for Kotlin Server JAX-RS library

* Added support using coroutines with Kotlin server JAX-RS library

* Added sample for Kotlin server JAX-RS library

* Added support for returnResponse option into Kotlin server JAX-RS library

* Fixed issue with optional parameters in Kotlin JAX-RS spec

* Fixed oneOf issue in Kotlin jaxrs-spec generator

* Added better documentation to Kotlin Server JAX-RS options

* Updated kotlin-server.md

* Updated kotlin-server jaxrs-spec samples

* Fixed issue with Kotlin JAX-RS spec and reserved names

* Regenerated samples
2022-01-29 10:37:51 +08:00
David Gamero
b2bb5d071e
[typescript] Adding Custom Agent Support for fetch call (#11400)
* add custom agent support

* samples

* more samples

* merge master files

* only enable custom agent on nodejs not browser

* samples again

* samples

* samples once more
2022-01-28 12:01:32 +01:00
devhl-labs
24366be0db
[csharp-netcore] Adding generic host library (#10627)
* added generichost library

* added templates

* added an event, improved docs, added logging

* adding event args file

* fixed hard coded package name

* added an AddTokens overload for a single token

* changed api clients to singletons to support the event registration

* build samples

* log exceptions while executing api responded event

* nrt bug fixes, dangling comma fix

* resolving comments

* removed debugging lines

* refactored token provider

* rate limit provider now default

* updated readme, added ConfigureAwait(false)

* DI fixes

* removed a hard coded project name

* fixed nrt bugs

* improved NRT and .net 3.1 support

* renamed projectName to apiName, added cli option

* trying to avoid conflict

* set GenerateAssemlbyInfo to true

* created docs/scripts folder

* moved ApiTestsBase.cs to not get overwritten

* test fixes and improvements

* fixed licenseId bug, updated readme

* build samples

* export docs

* removed new language features

* added support for .net standard 2.0

* added git_push.ps1

* fixed bug in git_push.sh due to the new directory, prompting user for commit message

* moved documentation folders

* fixed bug when apiKey in query

* bug fix
2022-01-28 12:05:36 +08:00
William Cheng
aed513f65d
[TS][nestjs] fix isListContainer with isArray (#11425)
* fix isListContainer with isArray in ts nextjs

* update samples
2022-01-28 10:56:30 +08:00
William Cheng
27d322de56
fix isArray, isMap tag in jaxrs spec templates (#11424) 2022-01-27 21:14:50 +08:00
William Cheng
604c1c0806
update jaxrs cxf, resteasy dependencies (#11414) 2022-01-26 16:23:41 +08:00
William Cheng
adcf04c63b
update jaxrs junit to newer version (#11410) 2022-01-26 15:40:24 +08:00
William Cheng
2ebadc36f7
update undertow dependencies (#11411) 2022-01-26 14:54:32 +08:00
Andriy Dmytruk
a0dd025c82
Add Micronaut server generator (#10270)
* Add micronaut server implementation

* Add micronaut server tests and imporovements

* Generate samples, docs and verify that tests pass

* Update micronaut docs and samples after merging with master

* Update micronaut dev server samples

* Add micronuat server docs

* Update micronaut version

* Minor changes to micronaut server and client

* Fix documentation generation in samples

Co-authored-by: Andriy Dmytruk <andriy.dmytruk@andriy.dmytruk.ca.oracle.com>
2022-01-26 13:51:19 +08:00
jiangyuan
8b3cad0692
[Python] fix model to dict (#11234)
* fix model to dict

* add unit test

* add unit test

* update sample files
2022-01-25 09:50:59 -08:00
William Cheng
5d2a3698e2
[java][okttp-gson-nextgen] update docstring in ApiClient, RetryingOAuth (#11395)
* update docstring in apiclient, retryingoauth (java client)

* update samples
2022-01-25 17:04:32 +08:00
Justin Black
42f3258faa
Turns on python-experimental CI tests (#11390)
* Installs python3.9 in node3

* Moves python clients into separate node so they can use a docker image

* Installs java and maven into docker

* Switches off some python tests
2022-01-24 15:44:38 -08:00
David Gamero
28cc286265
[typescript] Default auth method support and optional param object when all params optional (#11321)
* add default auth

* private

* default when optional params and fix types

* build samples

* remove extra space

* re-add space before default empty

* switch to default authentication method support in config

* generated samples

* null check chaining

* generate samples

* remove extra spaces

* regen samples

* formatting fixes

* more samples

* remove from abstract methods

* samples

* add default to inversify as well

* samples again

* exclude inversify

* samples once more

* samples
2022-01-22 12:11:04 +01:00
William Cheng
938cc36d1b
update node-fetch to newer version (#11378) 2022-01-22 10:18:20 +08:00
William Cheng
e0bde82131 update samples 2022-01-22 09:03:50 +08:00
cachescrubber
e1c5b220cd
[JAVA] new Feature interface: Documentation Provider and Annotation Library (#11258)
* Implement DocumentationProviderFeatures and integrate it in AbstractJavaCodegen

* Integrate DocumentationProviderFeatures in SpringCodegen

* Run new test config spring-boot-springdoc

* Do not use Locale.ROOT

* Do not use Locale.ROOT, use NONE instead of empty list

* Revert "Do not use Locale.ROOT"

This reverts commit a0d6aac92bea2370b4f164d18ada3fd9097f3a30.

* Do not use forbidden APIs

* Fix spring maven plugin example

* Introduce DocumentationProviderFeaturesTest.java

* replace AUTO with preferredAnnotationLibrary

* remove sout.println from Test

* Apply code style.

* Update spring sample configuration to use the new property

* Update samples after merge

* fix atBean import

* Generate all samples

* Add ParameterObject to test

* Allow Subclasses to opt out

* Use OpenAPI 2 (fka Swagger RESTful API Documentation Specification) instead of just "Swagger"

* export generator docs

* Fix typo

* Fix typo - update docs.
2022-01-22 08:51:17 +08:00
William Cheng
20bf0c73f8
remove duplicated else if condition (#11370) 2022-01-21 19:00:59 +08:00