5759 Commits

Author SHA1 Message Date
William Cheng
938cc36d1b
update node-fetch to newer version (#11378) 2022-01-22 10:18:20 +08:00
William Cheng
0358d6eb71
update api tests to work with nonPublicApi option (#11376) 2022-01-22 09:47:15 +08:00
Jochen Fähnlein
d737aa5fb8
Update GlobalConfiguration.mustache (#11359)
[csharp-netcore] corrected visibility of GlobalConfiguration mustache
2022-01-22 08:59:43 +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
Francisco Cánovas
5e1164c554
fix clone method (#11363) 2022-01-21 17:38:13 +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
Ananta Dwi Prasetya Purna Yuda
0cb88ce024
[KOTLIN] add modelMutable additional properties parser (#11332)
* [kotlin] add modelMutable parser

* [kotlin] fix kotlin vertx samples
2022-01-18 11:39:29 +00:00
William Cheng
90972c638a
add type check in the equal method (#11346) 2022-01-18 18:21:00 +08:00
K Zhang
915af3afcb
if discriminator is not defined with useOneOfDiscriminatorLookup set to true, we generated as useOneOfDiscriminatorLookup false (#11178) 2022-01-18 00:08:15 +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
e477538273
better checking for security definitions (#11335) 2022-01-17 11:06:55 +08:00
William Cheng
b2b077f07e
clean up default type mapping (#11336) 2022-01-17 11:06:25 +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
Esteban Gehring
3f4e7d8263
Revert "[typescript] Make module usable with esbuild (#11298)" (#11333)
This reverts commit 7129cdebc5524fb2516822d33b4d2000096cb72b.
2022-01-16 16:31:16 +01:00
William Cheng
341ad1fad4
[TypeScript Fetch] Default TypeScript fetch configuration to 3.6+ true #9974 (#11331)
* Default TypeScript fetch configuration to 3.6+ true, as it's been out for a while now

* TypeScript fetch update the three plus CLI option default to true

* Apply doc generator patch

* Build the project and update samples

* remove VERSION

* test ts fetch clients first

* Revert "test ts fetch clients first"

This reverts commit 590a7f2d30d67c6d9dd49d105a84b64c3525ff6e.

Co-authored-by: szTheory <szTheory@users.noreply.github.com>
2022-01-16 21:16:01 +08:00
Ananta Dwi Prasetya Purna Yuda
c7d9f5788d
[KOTLIN][CLIENT] fix unused library additional properties on kotlin generator (#11328)
* fix `library` additional properties on kotlin generator

* remove duplicated codes in kotlin generators
2022-01-16 10:09:36 +00:00
William Cheng
070f767d80
[C#][netcore] fix bugs in model naming when method names start with a number (#11330)
* first

* fix toModelName in C# generator when handling method names starting with numbers

* remove openapitools.json

* remove file
2022-01-16 17:49:26 +08:00
mactho
5bccbf6734
Fix an issue where moustache template adds an extra null to the generated source code when 'nullable: true' is used in the api spec (#11284)
Co-authored-by: Thomas MacNeil <Thomas.MacNeil@greater.com.au>
2022-01-16 10:39:20 +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
Knut Johannes Dahle
692a4db964
Added fix for wrongly encoded backticks when generating kotlin client with reserved words as part of the parameters. Wrote a test verifying that the method signatures is without html encoding for backticks (#11310) 2022-01-15 23:59:42 +08:00
Ethan Keller
6430aaf3b1
recursively search for types during import type collection in deeply … (#11221)
* recursively search for types during import type collection in deeply nested schemas #11220

* composed schema recursive type import handling

* change Importable to ComplexType to modularize related type-wrangling.

* Problems...

* Revert "Problems..."

This reverts commit 6154f202a0f4db7a706fe3d61b45573581d164d4.

* Reverted attempts to reuse recursive type-finding code.

* add javadoc comments

* fix javadoc warning.

* fix NPE

* PR feedback incorporation

* Include additionalProperties recursion.

* More feedback

* More feedback

* Add comments from feedback
2022-01-14 12:39:22 -08:00
Justin Black
57987424a4
Revert "Has generators set default template engine (#11245)" (#11316)
This reverts commit dd3bba8c9442f2ee40d6ea8f0872ab0be43714b9.
Because it broke peoples builds per this issue https://github.com/OpenAPITools/openapi-generator/issues/11276
2022-01-14 10:52:36 -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
759883f804
minor enhancements to java camel generator (#11296) 2022-01-14 01:08:22 +08:00
Bodo Graumann
7129cdebc5
[typescript] Make module usable with esbuild (#11298)
* Use default import from url-parse

* Update samples

* Fix typo in readme
2022-01-13 17:06:04 +01:00
Giacomo
2e6e82161f
Apache Camel Server Generator (#11162)
* Created Apache Camel language

* Added unit test

* Fix template dir

* Fix description api

* Camel Dataformat Properties

* Apache Camel Doc

* Apache Camel Doc

* Apache Camel Doc

* Apache Camel maven plugin example

* Fix LOGGER

* Samples

* Camel 3.14

* Samples

* samples

* up to date

* Rename camel to java-camel

* up to date

* Fix SerializedName in modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
2022-01-13 01:28:02 +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
Johan Sjöblom
3ed9a8e53c
Make Kotlin client generate comma separated list for array path params (#11228) 2022-01-13 00:59:00 +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
Justin Black
95a1154c20
python-experimental adds DecimalSchema (#11282)
* Fixes test

* Adds decimal examples to the pythonExp generator

* Adds isDecimal to CodegenModel, updates python-exp samples

* Fixes decimal types in ObjectModelWIthDecimalProperties and DecimalPayload

* Updates tests

* Decimal feature added to python-exp docs

* Samples and docs regenerated
2022-01-11 21:51:50 -08:00
Justin Black
ce04e9b6a2
python-experimental, redundant docstrings removed (#11281)
* Removes docstrings drom models because type hints already includes this info

* Samples updated
2022-01-11 09:31:25 -08:00
jiangyuan
45b66d660a
[python] modify python import classVarName to classFileName (#11180)
* fix python import classVarName to classFileName

* add samples change
2022-01-10 23:21:29 -08:00
Justin Black
1f7eebd52d
Fixes openapi-generator.tech content, python-exp documentation helpTxt updated (#11273)
* Fixes python-exp line breaks

* Docs updated
2022-01-10 20:11:57 -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
Justin Black
0eca629127
Adds generatorLanguage to all generators (#11268)
* Adds generatorLanguage to all generators

* Adds all generator languages and info to docs

* Docs updated
2022-01-10 12:13:35 -08:00
Justin Black
dd3bba8c94
Has generators set default template engine (#11245)
* Adds default template engine to generators

* Fixes sample batch generation
2022-01-10 08:59:20 -08:00
Sorin Florea
a4325ec520
ISSUE-11242: Fix Java native path param encoding (#11257) 2022-01-10 21:23:28 +08:00
Justin Black
d813d04f46
Improves generator docs, adds metadata section (#11262)
* Refactors generator md creation, adds generateMdMetadata

* Removes extra space

* Adds docs updates

* Fixes table definition for metadata

* Docs update

* Docs update

* Updates title, removes sidebar_label because it was not doing anything on pages like https://openapi-generator.tech/docs/generators/android

* Docs updated
2022-01-09 14:10:47 -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
Matthew
e7ca67071e
[python] Fix 10773 - Use base_name for file uploads in form data (#11182)
* Use base_name for file uploads in form data

* Added missed sample changes
2022-01-09 08:19:57 -08:00
Akira MATSUDA
febf49662a
Make moduleObject.mustache confirms to JSONEncodable. (#11202)
* Make moduleObject.mustache confirms to JSONEncodable.

* Regenerate samples

* Don't confirm JSONEncodable when using Vapor.

* Use CodableHelper.jsonEncoder

* Encode `Data` using `encodeToJSON()`

* Update sample

* Don't extend JSONEncodable when using Vapor.

* Add JSONEncodable in moduleEnum, moduleInlineEnumDeclaration, and modelOneOf

* Update sample

* Remove line break.

* Update sample

* Revert "Update sample"

This reverts commit 6ec206b506a5402a225184bd8e80f5e654f426f8.

* Don't confirm JSONEncodable when enum confirms RawRepresentable.

* Update sample

* Add space before {

* Update sample

* Don't confirm JSONEncodable when enum confirms RawRepresentable.
2022-01-09 23:47:03 +08:00