876 Commits

Author SHA1 Message Date
Hyunjin Jeong
e1f7fb0fbd
add-word-in-docs (#10567) 2021-10-09 15:47:57 +08:00
William Cheng
96c65fea61
[Java] add an option to customize gradle.properties (#10540)
* add an option to customize gradle properties

* add more info to gradle.properties
2021-10-08 11:20:50 +08:00
agilob
5b1b74e48d
Dart-jaguar: remove (#10534) 2021-10-08 10:47:17 +08:00
agilob
8d7be74b79
Dart json_serializable: remove experimental generator (#10533) 2021-10-06 01:38:50 +08:00
Josh Burton
f5e8f54b21
[dart-dio-next] Adds an option for using the dio_http package (#10497)
* [dart-dio] Adds an option for using the dio_http package

Relates to #10305

* [dart-dio-next] Generates new dio_http sample

* [dart-dio-next] renames dio_http sample, adds pom.xml

* [dart-dio-next] Removes executions not required
2021-10-05 14:03:48 +08:00
Heikki Haapala
755359c031
[typescript-axios] Fix model property naming (#10447)
* fix: typescript-axios property names

Disables MODEL_PROPERTY_NAMING for typescript-axios generator as this
was never supported (templates have no mapping between original property
names and formatted names). Wraps all properties in model interfaces
with '' to support most characters except ' for now. Also fixes missing
options typing that was any before.

* chore: add new sample, generate samples

* chore: update generator docs
2021-10-02 08:06:29 +02:00
William Cheng
c9047a6faa
[php] enhance type mapping (#10457)
* map BigDecimal to float

* enhance type mapping in php generators

* update tests

* update doc, samples

* remove primitive types from phpdt, mezzio
2021-09-25 12:09:34 +08:00
Bruno Coelho
7c133be617
[swift5][client] add support for async await (#10442)
* [swift5][client] add support for async await

* [swift5][client] disable CI for the async await sample project temporarily
2021-09-23 10:53:57 +08:00
Aleksandr Nekrasov
ef0186c9cf
[scala] Fix Array[Byte] type for Openapi type string format byte (#10426)
* [scala] fix byteArray mapping in AbstractScala

* fix testng framework instead of junit for sttp codegen

* regenerate scala examples

* regenerate docs and examples

* fix test
2021-09-21 12:15:49 +08:00
William Cheng
1947f130c0 update doc, samples 2021-09-21 11:52:33 +08:00
adessoDpd
1a48c5f19f
[Wsdl] Handle schema property of type array with oneOf items and other minor updates/fixes (#10434)
* add handling of array of oneOfs

* handle res model-type lowercase name +shorten code

* remove unnecessary vendor-extension model enum

* handle openapi lowercase schema name for array res

* change xs:anytype to string for file responses

* update checkstyles

* remove not needed imports again

* update samples

* upper/lowercase use local getdefault

* update  samples again
2021-09-21 11:46:05 +08:00
Jon Schoning
1247e77453
[haskell-http-client] add ability to choose additional characters in querystring which should not be encoded (e.g. "+" or ":") (fixes #3459) (#10424) 2021-09-19 02:02:22 -05:00
Bruno Coelho
27727acf52
[swift5][client] Fix issue 9953 (#10387)
* [swift5][client] Fix issue 9953

* [swift5][client] update docs
2021-09-14 11:39:32 +08:00
Ahmed Yarub Hani Al Nuaimi
86ead27a40
Windows adaptations and installer configuration (#10326)
* Undefine reserved keywords
Cast to correct type when applicable to be compilable on C++ compilers
Add conditional instllation of configuration files

* Update samples

* Use default installation method if no configuration script is provided

* Undefine stdin/stderr/stdout only for model files

* Undefine stdin/stderr/stdout only for model files in samples

* Remove #undef directives

* Add stdin/stderr/stdout to reserved words for libcurl-C generator

* Expose all symbols when compiling libcurl as a shared library on Windows
Install header files
Set correct flags for target link libraries

* Remove line

* Regenerate samples

* Add comment

* Update documentations

* Revert "Update documentations"

This reverts commit 0e25659de2d68753e1e033eaa83e769c028de5cb.

* Update documentations

* Add versioning support

* Add versioning support

* Add comment
2021-09-08 10:55:49 +08:00
andrew-matteson
bc3ee32498
Angular 12 Support: Typescript upgrade + HttpContext (#10336)
* Basic Angular 12 support.

* Make samples

* Pass HTTP Context for Angular client

* Generate samples for Angular-v12

* Add all samples
2021-09-07 08:23:52 +02:00
bgong-mdsol
0c7ec41aff
[sala-sttp]Add 'clone' in reservedWords list (#10293)
* add 'clone' to reservedWords

* scala - add reserved keyword clone
2021-09-01 02:28:43 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
William Cheng
7bdbfed467
Remove skipReadonlyPropertiesInInit option (#10269)
* remove skipReadonlyPropertiesInInit option

* fix removal

* more removal

* fix again
2021-08-28 22:43:53 +08:00
Lazar Prijović
691a10ad8e
[cpp-ue4] Fix model generation for arbitrary-typed values (#10267)
* Replace AnyType declaration with FJsonValue

* Rebuild docs
2021-08-26 16:35:25 +08:00
William Cheng
badfdccd5e update doc 2021-08-25 10:25:11 +08:00
Aanisha Mishra
67fbb1081e
Skip setting readOnly properties with default values in model constructors (#10196)
* skipReadonlyPropertiesInInt flag to go SDK

* minor amendments

* update docs for go
2021-08-25 10:21:02 +08:00
William Cheng
90fca17de1
[haskell-yesod] Better code format, mark generator as beta (#10222)
* better code format, mark haskell-yesod as beta

* fix copyright

* update doc
2021-08-22 11:31:38 +08:00
William Cheng
3de5483aa0
[JAVA] Add apache httpclient library to java clients (#10218)
* Add apache java client option

* Add sample apache client config

* Switch serialization library, use time formatter

* Add pom template for apache dependencies

* Add initial implementation of ApiClient using apache

* Add apache api template

Plus switch to TypeReference to handle generic types

* Add support for sending json data

* Generate test stubs with @Ignore

* Add accept header

* Remove unnecessary builder assignments

* Set responseHeaders instance variable

* Switch to general serialize / deserialize functions

* Handle sending url encoded form data

* Split response processing into new method

* Allow requests without body

* Use general HttpResponse interface

If the method doesn't need to close it

* Use clients connection timeout

* Add constructor accepting custom client

* Handle multipart and direct file uploads

* Support file downloading

Based on the implementation in the jersey client

* Handle missing content disposition

* Raise error if body given for an unexpected method

* Use try with resources for response handling

* Remove unused url parameter encode method

* Handle content type parse exception

* Improve response content type handling

Would have had issues with content type headers containing a charset

* Make all set methods return client

* Add basic readme

* Send content type with files

* Set domain and path on cookies

Otherwise they will be excluded from the request

* Use consistent quoting in error messages

* Add generated apache sample

* Add generated docs changes

* update samples

* rename library, update samples, docs

* update readme

Co-authored-by: Harry White <hwhite@atlassian.com>
2021-08-22 11:17:31 +08:00
William Cheng
4fcf1f56fb update samples, doc 2021-08-22 01:49:22 +08:00
Kenzo Yotsuya
4e3a98cee4
New server generator for Haskell/Yesod (#10193)
* Add a new server generator for Haskell/Yesod

* Fix missing locale
2021-08-21 23:57:18 +08:00
Johannes Wienke
f47dc4d84b
Document JSON-B as microprofile client target (#10172)
The documentation for the Java microprofile client wrongly states that
Jackson is used. This commit corrects this to JSON-B.

Relates to: #8015
2021-08-21 22:32:04 +08:00
michaelgrahamevans
4da3d45c21
[markdown] Add primitive types to Markdown generator (#5449) (#10106) 2021-08-18 16:20:02 +08:00
Guillaume TOURBIER
9ece1b5111
[Java] refactor: improve additionalModelTypeAnnotations generation (#8269)
* refactor: improve additionalModelTypeAnnotations generation

Split by ';' and/or newline
Trim value

fix: #7032

Run ./bin/generate-samples.sh to regenerate model files

Revert "Run ./bin/generate-samples.sh to regenerate model files"

This reverts commit da509c39f363da046fbd457e1ab67ef0f62f3561.

refector: remove unnecessary import

test: multiples tests for AdditionalModelTypeAnnotations

Add a getter to test the list

refactor: remove duplicate AdditionalModelTypeAnnotations

Without using Set to avoid any side effect somewhere, I use stream and
distinct to avoid duplicates

refactor: using Set instead of stream

Remove stream distinct for performance reason, use newHashSet
Keep AdditionalModelTypeAnnotations as List

doc: update info additionalModelTypeAnnotations

refactor: move doc in code for autogen

style: tab in java class

doc: run ensure-up-to-date

refactor: add imports lost in rebase

docs: regenerate docs

docs: update

* fix: docs
2021-08-17 18:10:19 +08:00
William Cheng
8403e59aa0
Prepare 5.2.1 release (#10161)
* prepare for 5.2.1 release

* update samples
2021-08-16 19:08:29 +08:00
William Cheng
8eb31d0c7c
minor improvements to php-dt generator (#10159) 2021-08-16 12:05:02 +08:00
William Cheng
87554ecb2d
[java][micronaut] minor improvements (#10158)
* mark java micronaut generator as beta

* update doc
2021-08-16 12:04:42 +08:00
William Cheng
74671fa242 update doc 2021-08-15 23:02:36 +08:00
Andriy Dmytruk
09aa7bfd0a
Add support for Micronaut Client (#10063)
* Create initial version of openapi micronaut generator

* Update validation, authorization, query parameters and time format

* Move micronaut to its own generator

* Add micronaut documentation

* Refactor and add tests to JavaMicronautClientGenerator

* Refactor model mustache for micronaut client

* Refactor model enum and pojo mustache files for micronaut client

* Move micronaut client generation to micronaut 3.0.0-M5 version

* Generate samples for micronaut client

* Add hidden files of generated samples for micronaut client

* Add and configure micronaut tests as maven profile

* Add option to choose between junit and spock for micronaut client generator

* Add tests for micronaut 'build' and 'test' options; regenerate micronaut samples
2021-08-15 22:36:45 +08:00
Arthur Mogliev
2210c9f016
[PHP] New client generator php-dt (#10041)
* - new PHP client generator php-dt

* - samples regen after rebase

* - README update

* - fix missing options for php-dt-modern config

* - use another workaround to prevent special treatment of form media types in DefaultGenerator - GlobalSettings usage mangled behaviour of other generators
- fix of missing spaces in generated docs

* - samples update after rebase
2021-08-15 22:15:44 +08:00
James Gilliland
09a4da0970
Make php's array a primitive (#10093)
Fixes a bug where code generation would sometimes treat arrays as
objects and break serialization and code documentation.
2021-08-07 21:02:40 +08:00
Timothy Langer
ac1ef4bdeb
Fix typo (preffer -> prefer) (#10098) 2021-08-07 20:57:43 +08:00
William Cheng
31eb65ab67
[C#][netcore] minor bug fixes (#10074)
* fix property name, fix enum comment

* update doc
2021-08-03 16:43:39 +08:00
William Cheng
ec49dc3fed
[Kotlin] minor bug fixes (#10071)
* fix http basic auth, deprecate option, escape special property name

* update doc
2021-08-02 18:04:38 +08:00
Noor Dawod
e39e4bcd6e
Kotlin client/spacings indentations (#9853)
* Bump jimschubert/query-tag-action from 1 to 2

Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases)
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2)

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

* Adjust spacings, bring back suppresses to silence IntelliJ IDEs.

* Suppress few warnings since we know we are using them in the code.

* toLowerCase() is deprecated.

* Wrap enum values in backticks to guard against reserved names, bring back encode/decode for each enum.

* Wrap property names in backticks to guard against reserved names.

* Regenerate samples.

* Do not warn about unused imports.

* Regenerate samples.

* Updated petstore code.

* Add missing reserved Kotlin operators and special keywords.

* Revert adding backticks.

* Regenerate pet store shop code.

* Remove unused suppression.

* Use 3 braces to wrap name.

* Regenerate pet store shop code.

* Remove get from reserved words.

* Revert back removal of description.

* Regenerate source code for Petstore.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-02 17:38:22 +08:00
Matthias Ernst
17b6379df5
[Kotlin Multiplatform] Update and fixes for Kotlin 1.5.10 and Kotlinx.serialization 1.2.1 (#9755)
* Update Kotlin Multiplatform with Kotlin 1.5.10, Ktor 1.6.0 and Kotlinx.serialization 1.2.1
* remove @Serializable from interfaces
* Using 'String(CharArray): String' is an error. Use CharArray.concatToString() instead
* Fix, RequestConfig needs a type to infer type variable T

Fixes from @DevSrSouzaern
* Fix `private` keyword not being handle as a reservedWords
* Fix enum serialization generation
* Migrate gradle build to Kotlin DSL

* update samples and documentation

* PR Review changes
* sample update
* revert non multiplatform kotlinx_serialization removal
* default Json{} in ApiClient
* revert accidental version push for jvm client
* Match ktor and Kotlinx Serialization version in documentation and build.gradle.kts

* remove const from JSON_DEFAULT

* Update AbstractKotlinCodegen.java

Co-authored-by: Gabriel Souza <devsrsouza@gmail.com>
Co-authored-by: ern <ern@ti8m.ch>
2021-07-03 23:33:39 +08:00
SimeonGerginov
3663831b4d
[REQ][PowerShell] Improve generated PowerShell examples (#9836)
* Implement new PowerShell example structure

Signed-off-by: Simeon Gerginov <sgerginov@vmware.com>

* Modify documentation template to work with the new PowerShell example format

Signed-off-by: Simeon Gerginov <sgerginov@vmware.com>

* Update PowerShell Generator documentation with the new properties

Signed-off-by: Simeon Gerginov <sgerginov@vmware.com>

* Update PowerShell samples with the new PowerShell example format

Signed-off-by: Simeon Gerginov <sgerginov@vmware.com>

* Fix issues with array of models as parameters

Signed-off-by: Simeon Gerginov <simeongerginov1@gmail.com>

* Change string value generation to include the prefix 'My'

Signed-off-by: Simeon Gerginov <simeongerginov1@gmail.com>

* Remove multiple new lines and trim leading and trailing spaces in PowerShell example

Signed-off-by: Simeon Gerginov <simeongerginov1@gmail.com>
2021-07-03 22:27:06 +08:00
Bernhard Danecker
32a3eb1655
fix generate-samples code sample line break (#9880) 2021-07-03 22:09:53 +08:00
Adriaan Duz
147367e559
[Kotlin][Bug] Added open, external and internal as reserved keywords for kotlin (#9842)
* Added open, external and internal as reserved keywords for kotlin

* ./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
with only kotlin
2021-07-01 17:54:04 +08:00
Ghufran Zahidi
90233d6653
conditional serialization add only those property which user wants to… (#9807)
* conditional serialization add only those property which user wants to configure.

* fixed the samples

* fixed the sample String to string issue.

* fixed the sample String to string issue.

* updated the sample

* Added unit test for conditional serialization

* update samples

* remove trailing spaces, update samples

* remove files

* add back files

* build the project in the ci

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-06-29 20:28:47 +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
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
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
devhl-labs
46f8a6733a
[csharp] Move nullable reference types switch to abstract (#9661)
* moved switch to abstract

* build samples

* added nullable option to csproj

* removed unused method

* added switch back to aspnetcore

* build samples
2021-06-09 16:09:39 +08:00
Mike Marchetti
7125ef43f5
Typescript: fix: add paramPropertyNaming (#9546)
Model naming conforms to the property: modelPropertyNaming, however the
parameter naming scheme is currently hardcoded to camelcase. Since the
parameter names are closely tied to the model properties names, is maybe
desirable to use a similar naming approach.

The toParamName cannot directly use the paramPropertyNaming since that
will cause issues with current generated code, since the
modelPropertyNaming currently defaults to "original"

A new property has been created to override this behavior, named
"paramPropertyNaming", and its default is set to "camelcase".
2021-06-07 22:17:25 +02:00
William Cheng
c2cc7a02aa
Fix kotlin client issue in maven plugin tests (#9690)
* fix kotlin client issue in maven plugin tests

* set version to v1.5.10

* update doc
2021-06-07 12:44:23 +08:00