7409 Commits

Author SHA1 Message Date
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
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
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
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
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
adcf04c63b
update jaxrs junit to newer version (#11410) 2022-01-26 15:40:24 +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
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
William Cheng
b7c8de9425 update samples 2022-01-21 17:45:53 +08:00
hackerman
93488f4195
Resolve several issues in generated Go code (#8491)
* [go] use regular stdlib import names

* [go] support primitive oneOf types

See #8489

* [go] improve pbv/pbr handling

Improves the way pass-by-value and pass-by-reference variables are used.

Closes #8489

* [go] improve generated documentation

* [go] adopt pointer changes in interface

* [go] regenerate sample

* [go] resolve pointer issues

* [go] regenerate clients and avoid pointers on primitive return values

* [go] improve Exec() return value handling

* [go] regernate files

* [go] use go modules

* [go] properly handle polymorph decode

If polymorphism without discriminator was used, the previous code was unable to properly decode the vaules. By using a strict decoder, which rejects unknown fields, type guessing now works.

* [go] make GetActualInstance not panic on nil

* [go] return GenericOpenAPIError as pointer

* [go] clarify helper function godoc

* [go] address test regression error type

* [go] regenerate go samples

* [go] resolve go mod issues and test regressions

* [go] resolve merge conflicts and regenerate

* [go] resolve merge conflicts

* [go] Replace spaces with tabs

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>

* [go] Replace spaces with tabs

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
2022-01-21 16:54:09 +08:00
William Cheng
55ffdb791f
mark retry class as static (#11369) 2022-01-21 16:36:19 +08:00
William Cheng
2d927a738b
Improve example value handling in C# generators (#11355)
* improve example value handling in C# generators

* fix typo

* update samples
2022-01-19 18:43:39 +08:00
cachescrubber
0f6b620817
[Java Spring OAS3] Minor fixes and general improvements (#11229)
* * Use Relative Imports for org.springframework.core.io.Resource
* api.mustache: Add operationId to atOperation annotation
* Overhaul atSchema annotation in model
* Add spring-stubs-oas3.yaml test config
* Optimize mustache templates
* Use Relative Imports for DateTimeFormat, Pageable and ApiIgnore

* Add spring-stubs-oas3.yaml test config

* Generate all samples

* Explain fromOperation override to support more logic-less templates.

* Support RootUriTemplateHandler from spring-boot

* Revert "Support RootUriTemplateHandler from spring-boot"

This reverts commit 1915f8b19e391b1c570f1025931690a67afba3ea.

* Evaluate additional property useSpringfox as Boolean

* Generate all samples after merge (java-camel)

* Fix typo

* Move java-camel test deom samples.circleci.spring to samples.circleci profile.

* re-generate all samples after merge

* Generate samples and docs after merge

* Generate samples after merge conflicts resolved
2022-01-17 15:25:50 +08:00
William Cheng
33bce99b8e
Avoid using import mapping in model generation (#11217)
* remove import mapping logic in model generation, better handle of file, list

* add new files for file, list

* fix some tests

* update tests, doc

* skip file as reserved word in feign client

* add new files

* remove file from reserved word list in spring generator
2022-01-16 23:57:53 +08:00
mvistein
c12456de8e
[Java-okhttp-gson] Do not set content-type if content type is null #2 (#11315)
* Fixing empty Content-Type in HTTP requests

* Updating samples
2022-01-16 10:29:47 +08:00
jiangyuan
0427681bc4
fix java apache-httpclient set basePath (#11277) 2022-01-16 10:23:15 +08:00
Paul-Etienne François
249968e397
[Java][Native] Fix the Content-Type and Accept headers that were forced to application/json (#11303)
* [Java][Native] Fix the Content-Type and Accept headers that were forced to application/json

* Update the generated samples after fixing issue no. 6779
2022-01-16 00:51:40 +08:00
Anakael
1b6d0f8746
Add condition for header (#11325) 2022-01-16 00:18:12 +08:00
Amelia Raia
d8cb6bd894
Allow the user to pass in any headers per request. #11139 (#11140)
* [Python] Allow the user to pass in any headers per request

* Update docs

* Update docs

Update Docs _headers

* Add test

Co-authored-by: Rizwan Saeed <rizwan.saeed@finbourne.com>
2022-01-13 15:25:40 -08:00
William Cheng
3e8dc31ec5 update samples 2022-01-13 01:49:52 +08:00
William Cheng
69b64ebb0e
[kotlin][client] add tests for comma separated list in array path params (#11293)
* add tests for kotlin-array-simple-string

* add new files

* remove build fies

* clean up
2022-01-13 01:26:07 +08:00
방진영
69db8176b6
keyword conflict with zebos list_creat(), list_free() (#11190)
* keyword conflict with zebos list_creat(), list_free()

* keyword conflict in zebos list_create list_free
2022-01-13 00:42:58 +08:00
Ashutosh Gangwar
1bfed460c5
Fix missing ApiKeyAuth import in 'jvm-retrofit2' Kotlin client template (#11286)
* fix incorrect ApiKeyAuth import in jvm-retrofit2 kotlin-client template

links to
- https://github.com/OpenAPITools/openapi-generator/issues/10008
- https://github.com/OpenAPITools/openapi-generator/pull/10708

* update kotlin-retrofit2 samples
2022-01-12 19:22:24 +08:00
Anakael
f06e7c52f4
Add only one auth header (#11272) 2022-01-11 12:09:33 +08:00
joaocmendes
b05faefb93
[BUG][csharp-netcore] Fix Multi Files for the same FormField (#11132) (#11259)
* [BUG][csharp-netcore] Fix Multi Files for the some FormField  (#11132)

Make FileParamerts a Multimap to enable sending more than one file with the same key.

* update documentation for csharp-netcore
2022-01-11 11:02:39 +08:00
Justin Black
de036e211e
Improves generator docs: stability + language version added (#11270)
* Adds generatorLanguageVersion and uses it in python generators

* Regenerates docs

* Adds stability to generator docs

* Triple braces generatorLanguageVersion

* Regenerates samples

* Fixes the python-experimental setup.py file so it works with generatorLanguageVersion

* Updates generators readme
2022-01-10 18:16:53 -08:00
Sorin Florea
a4325ec520
ISSUE-11242: Fix Java native path param encoding (#11257) 2022-01-10 21:23:28 +08:00
carmenquan
478219744e
Making PyPi markdown friendly requires additional property (#11093)
* updating python markdown property

* adding to samples
2022-01-09 08:22:11 -08:00