18059 Commits

Author SHA1 Message Date
William Cheng
0f578d4a83 comment out ts inversify tests 2021-06-24 11:42:49 +08:00
Gabriel Rohden
44c1fee3e2
[dart] fix some compilation issues and added casts for analyzer implicit-casts flag (#8244)
* fix: missing dart casts and analyzer issues

* chore: regenerate dart template files

* refactor: remove unneeded implicit-casts:false and regenerate sources

* chore: regenerate templates after merge

* chore: regenerate dart pet store codes
2021-06-24 10:24:28 +08:00
bflamand
48e05ce162
[Typescript Fetch] New optional mode with redux saga & immutablejs (saga & records) (#8578)
* first commit: add cli option for saga and records. Added dummy sagas.mustache test file.

* More progress with default values. First prototype for isEntity and isUniqueId.

* record generation complete

* record generation complete

* progress with saga generation

* progress with saga generation

* first fully working saga generation

* merge with latest master

* removed unneeded "items" properties.

* moved global CodegenModel modifications into subclass ExtendedCodegenModel used exclusively by TypescriptFetchClient. Adding missing samples files.

* moved global CodegenOperation modifications into subclass ExtendedCodegenOperation used exclusively by TypescriptFetchClient.

* moved global CodegenProperty modifications into subclass ExtendedCodegenProperty used exclusively by TypescriptFetchClient.

* moved global CodegenParameter modifications into subclass ExtendedCodegenParameter used exclusively by TypescriptFetchClient.

* added the missing "allSagas" export.

* renamed & reworked "meta data response" flags to a more useful general concept of "operation return passthrough"

* added vendor flag keepAsJSObject as escape hatch to support circular dependencies in models and other special cases. Also fixed issues with default values for some records properties.

* added autodetection for passthrough to simplify standardised specs.

* fix small issue with passthrough void

* fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values.

* fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values.

* Added "reservedRecordField" feature to support remapping fields names that cannot be used in Records. Added missing export to record: toApi().

* added uniqueId inference. Fix small generation when uniqueId property is an array.

* removed feature "reservedRecordField" and replaced it with existing built-in "reserved words" feature. Fix minor issues with typings in generated files.

* Changed api recType names to make them less likely to cause name conflicts. Added generated ApiEntities (record, reducer & selector) files.

* Moved location of ApiEntities related files and fix issues with exports.

* - merge latest master
- renamed fake test apis to better fit the "pet theme"
- added mode for "SourceOnlyLibrary" (same as used in codegen typescript jquery)

* - missing ganarate sampless

* - Modified way to export apiEntitiesSelectpr to reduce typescript analysis time for consuming project. Removed tab characters in mustache files. Reformat code for TypeScriptFetchClientCodegen to try to remove false positive for tabs vs spaces.

* - added markErrorsAsHandled property to api sagas. Increased typescript version to address some typing errors on library build.

* - fix bug in saga interfaces. Upgraded to typescript "strict" mode to ensure proper typechecking info is generated.

* - added optional id for apiEntity selectors. Added toInlined() support to convert an entity to an inlined model recursively.

* - minor tweak for apiEntitySelector to accept null id

* - minor tweak for apiEntitySelector

* - runned ensure up to date.

* Revert "- runned ensure up to date."

This reverts commit ea9b4aed

* - runned ensure up to date.

* - runned ensure up to date.

Co-authored-by: Bruno Flamand <bflamand@stingray.com>
2021-06-24 00:07:17 +08:00
William Cheng
5bf4e77400
Add a link to blog post about openapi-generator (#9832) 2021-06-23 15:16:07 +08:00
Kevyn Liebersbach
77f84ec811
Limit depth of example code generation in RClientCodegen (#9822) 2021-06-23 11:29:48 +08:00
Kuzma
969cea8ce1
[Typescript] Fix oneOf (#9628)
* on of

* fix map

* samples

* file to any

* samples

* add unit tests

* clear code
2021-06-21 23:42:47 +02:00
Max Goltzsche
2e85ccdec8
[go-server] fix addResponseHeaders tpl option typo (#9814)
According to the [documentation](https://openapi-generator.tech/docs/generators/go-server) the go-server generator should support an `addResponseHeaders` option but a template uses an `addResponseHeader` option in some places which this PR fixes.

Closes #9795

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2021-06-21 11:46:51 +08:00
William Cheng
939b5f6bb8 update samples 2021-06-21 11:24:46 +08:00
Mehmet YUCE
ccd031a3da
Continuing from #1317 and its PRs for pistache server string enum code generation (#9786)
* Continuing from #1317 and its PRs for pistache server string enum code generation;
* A class that has an `anyOf` specification, in cpp side will have no members: in stead it should have a member having the type `classname_anyOf`
* Thus, Its `==` operator is not present or wrongly filled
* An string enum, should have a better usage, hence the `setEnumValue`
* this PR, is a brigde between `stringenumclassname_anyOf` and `stringenumclassname`
* `anyOf` specification is not just about `Enums`, so a better handling is needed from mustache templates, hence new template model parameter `isStringEnumContainer`

* PR fix: muttleyxd: `double semicolon`

* PR fix: wing328: `I think std::string is C++ only. What about adding x-is-string-enum-container instead in the postProcessModel operation in the C++ pistache server generator?`

* PR fix: wing328: `I think std::string is C++ only...` after fix get latest codes and then generate samples

Co-authored-by: Mehmet Fatih <mfyuce@netas.com.tr>
2021-06-20 22:13:38 +08:00
Sascha Peilicke
463d905664
Kotlin-Server: Optional metrics and upgrade to Ktor 1.5.4 (#9358)
Use Gradle 6.9 and Kotlin 1.4.32. Generate Paths for other HTTP verbs
(#828) and fix imports (#5640). Use 'object' when no parameters are
used. Introduce 'featureMetrics' to control metrics plugin usage. Remove
HOCON configuration parsing. This is provided by
`Application.environment.config already` and removes a dependency.

Resolves #9087, resolves #828, resolves #5640
Relates-To #5346
2021-06-20 22:03:44 +08:00
Prajon Shakya
015886fded
[csharp][netcore] Update type "String" to "string" for consistent type (#9713)
* Updated 'String' to 'string' for consistent use of keyword

* Build project and update samples for csharp-netcore
2021-06-19 12:42:33 +08:00
William Cheng
c5405aa59a
[Go-client] Fix inability to download files (#9812)
* Revert a change to the Go Client code that broke
the ability to download files. This reverts the change
from 14d41310b9

* Missed import for "io/ioutil"

* update samples

Co-authored-by: icubbon <icubbon@gmail.com>
2021-06-19 11:23:05 +08:00
William Cheng
70fb429c98 update erlang server samples 2021-06-19 10:50:52 +08:00
Yoshiyuki Kurauchi
513e242a3e
Return empty binary for 304 (#9800) 2021-06-19 10:50:28 +08:00
Sebastian Weddmark Olsson
73350073b2
[erlang-server] spec fixes (#9784) 2021-06-19 10:44:31 +08:00
William Cheng
d13685a3ad
More updates for isBoolean (#9802)
* more updates for isBoolean

* update samples
2021-06-19 10:44:00 +08:00
Minjae Kim
41afcd0f86
Handle boolean enum correctly in typescript-axios (#9025)
can't use enum because of TS18033
2021-06-18 16:34:38 +08:00
Hippolyte HENRY
7389446354
Add imports for inner items of arrays/maps in composed schemas (#9268)
* Add imports for inner items of arrays/maps in composedSchemas

* Add test case for typescript-angular

* tests

* tests

* disable generate alias

* Create different config
2021-06-18 16:08:03 +08:00
Guillaume TOURBIER
95a11a7f5d
[Java][WebClient] add ResponseEntity return for webclient (#9327)
* feat: add ResponseEntity return for webclient

fix: #5599

* refactor: merge functions

simplification to avoir duplicated code
2021-06-18 16:03:38 +08:00
Sandeep jindal
c7038d1b57
[scala][client] invoker package enhancement (#9381)
* updated invoker

remove unwanted set the invoker

fixed the ordering of supported files

added sample generated files

regenerated samples

added docs

* sample files

Co-authored-by: sjindal <sandeep.jindal@agoda.com>
2021-06-18 15:53:25 +08:00
Daniel Krebs
2e65e6f62d
[python][client] allow passing floats for _request_timeout (#9532)
* [python][client] allow passing floats for _request_timeout

While several method docstrings suggested that you could pass floats for
_request_timeout and the underlying urllib3.Timeout can deal with them,
the code only allowed integer values so far when passed as a single
number.

* [python][samples] update with fix for _request_timeout type
2021-06-18 15:09:55 +08:00
shartte
8a31064028
[Java] Remove JAX-RS dependency from generated java-native client. (#8320) (#9585) 2021-06-18 15:05:55 +08:00
Tobias Tiemerding
75fc1383bc
Fix typo (Unsuported -> Unsupported) (#9790) 2021-06-17 13:44:12 +08:00
Albert
55600256b2
[rust-client]: fix reqwest not support client::options (#9745)
* fix: https://github.com/OpenAPITools/openapi-generator/issues/9743

* update samples
2021-06-17 01:17:50 +08:00
Bruno Coelho
687692cedc
update AnyCodable and gitignore (#9777) 2021-06-17 00:37:23 +08:00
Anders Aaen Springborg
56260bf522
Update contributers (#9783)
We were four people who made the cpp-tiny client generator :) ❤️
2021-06-17 00:36:38 +08:00
Ween Jiann
77e1ca56cf
[go-server] Add go-chi generator to go-server via a router property (#9748)
* Add go-chi generator to go-server

* Add go-chi configs

* Add go-chi generated output

* Updated docs

* Add some javadocs

* Fix import issue

* Regen files
2021-06-16 16:53:20 +08:00
William Cheng
d3baa93a62 update java resteasy samples 2021-06-16 16:02:58 +08:00
Celebrate-future
8af147b3ea
Update pom.mustache (#9768)
* Update pom.mustache

* Update pom.mustache
2021-06-16 15:59:09 +08:00
Nikita Vakula
d3b2089e89
[python-fastapi] Fixed integration tests (#9771)
* [python-fastapi] Fixed integration tests

Currently, it is required to use python 3.7 to make
python-fastapi generator work. This version is already
set in the generated Dockerfile. Thus, it makes sense to
build this image. Spotify's docker maven plugin can be
used to build the docker image.

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>

* fixup! [python-fastapi] Fixed integration tests

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
2021-06-16 15:49:02 +08:00
Christian Schuster
5bbdc62ada
create explicit copy of system properties (#7601) (#9653) 2021-06-15 21:27:13 +08:00
William Cheng
ef3186f4a6 comment out python fastapi test due to failure in ci 2021-06-15 15:26:30 +08:00
Julian G
3fcbf17536
[C++][Pistache] Fix compile break, error handling (#9742)
* fix compilation break with validate function

* fix error handling in handleParsingException
bug caused all errors to be regarded as an internal server error

* generate samples
2021-06-15 14:42:29 +08:00
randomswdev
3edeaeea07
Fix single inheritance code generation for goserver (#8356)
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
2021-06-14 18:56:02 +08:00
William Cheng
795c25d273 update go gin server samples 2021-06-14 18:50:21 +08:00
parpa
376e4192e1
Update routers.mustache (#9662)
Add PATCH suppord.
2021-06-14 18:48:55 +08:00
William Cheng
d14a82f7a7
update readme with travis-ci.com (#9762) 2021-06-14 18:22:57 +08:00
Christoph Ludwig
f3e3a724fb
Fix python-fastapi free-form objects mapping and forward ref type hints (#9723)
* map free-form objects to Dict[str, Any]

* support Forward Type References

Forward type references will be supported by default from Python 3.10 on only. Until then (and starting with Python 3.7), we can opt in by a __future__ import, cf. https://docs.python.org/3.9/whatsnew/3.7.html?highlight=forward#pep-563-postponed-evaluation-of-annotations

* re-created pet-store sample

* bump required Python version to 3.7 for generated FastAPI projects

* make pydantic modell classes process forward type references
2021-06-14 18:05:36 +08:00
William Cheng
874d7d4f97
skip oauth files in java feign (#9760) 2021-06-14 18:04:34 +08:00
William Cheng
45175f018b update haskell-servant samples 2021-06-14 17:01:26 +08:00
Profpatsch
cdb92086db
[haskell][server]: Set "AnyType" to Aeson.Value (#9733)
* [haskell][server]: Set "AnyType" to `Aeson.Value`

`AnyType` would not be translated to the json value type.
This fixes that.

* [haskell][server] Fix haddock error in `API.hs`

Haddock (the Haskell documentation generator) would choke on the
misplaced docstring. The heading has to appear inside the list.
2021-06-14 17:00:11 +08:00
Ivan
856eca4ee6
Hide buildOauthRequestInterceptor under isOAuth section (#9147) (#9736) 2021-06-14 15:39:55 +08:00
Daiki Ojima
5c1270aa37
fix(readme): update brew cask usage (#9757) 2021-06-14 15:08:21 +08:00
Tino Fuhrmann
0dcae66e0c
Revert "[typescript] Generate documentation and examples (#9413)" (#9758)
This reverts commit 624b6a7a85a22579f26be47698c99e583f582c64.
2021-06-14 08:12:41 +02:00
Yuriy Belenko
150dfa2ddd
Add ybelenko as php-slim4 template creator (#9754)
Thanks to Julian(jfastnacht) who started Slim3 generator and maintained it
until Nov 27, 2017(latest PR). Since Slim4 codegen is based on deprecated
Slim3 I greatly appreciate your commitment.
2021-06-13 01:24:56 +08:00
NouemanKHAL
624b6a7a85
[typescript] Generate documentation and examples (#9413)
* generate docs for typescript

* commit changed files
2021-06-12 09:31:40 +02:00
Payal Gadura
98ae4ab614
Filter out problem+json mime type from JSON mime types (#9680) 2021-06-11 00:59:22 +08:00
Ygal Blum
bd18ba6b41
operationId: Allow getting only the method name (#9719) (#9724)
Add new configuration flags: REMOVE_OPERATION_ID_PREFIX_DELIMITER and REMOVE_OPERATION_ID_PREFIX_COUNT
Add the corresponding fields in the DefaultCodegen
Sanitize the operationId according to the new fields
Add delimiter to list of nonNameElementPattern
Add unit test
2021-06-11 00:02:03 +08:00
FallenRiteMonk
6611ae64bb
[dart] fix Date.toDateTime utc (#9717) 2021-06-10 11:11:08 +08:00
dependabot[bot]
99994945c7
Bump actions/cache from 2.1.5 to 2.1.6 (#9614)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-10 11:10:15 +08:00