7409 Commits

Author SHA1 Message Date
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
William Cheng
cd2bd84bb6 update samples 2021-06-29 20:37:09 +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
William Cheng
919945b65b
ensure haskell, erlang server samles up-to-date (#9851) 2021-06-26 18:53:07 +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
939b5f6bb8 update samples 2021-06-21 11:24:46 +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
d13685a3ad
More updates for isBoolean (#9802)
* more updates for isBoolean

* update samples
2021-06-19 10:44:00 +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
William Cheng
d3baa93a62 update java resteasy samples 2021-06-16 16:02:58 +08:00
Payal Gadura
98ae4ab614
Filter out problem+json mime type from JSON mime types (#9680) 2021-06-11 00:59:22 +08:00
Fabian Sellmann
32c1e925dc
[typescript-fetch] runtime: pass init and url as returned by the premiddleware to the postmiddleware (#9716)
* pass init and url as returned by the premiddleware to the postmiddleware

Current implementation will always pass the initial url and init object. However if a pre middleware changes returns an object whose `init` or `url` property refer to a different url string or object, any following post middleware wont have access to it. Effectively providing the post middleware with a completely different request information then what was actually used to make the fetch call.

* update samples and docs
2021-06-09 18:23:50 +02:00
William Cheng
cce0d0a222
update resteasy dependencies (#9729) 2021-06-09 15:43:55 +08:00
William Cheng
85e77e77fc
[Android] update httpclient version, fix compilation issue in the sample (#9728)
* update httpclient version, fix compilation issue in the sample

* add new file
2021-06-09 13:21:10 +08:00
William Cheng
cd2ef91dc3
Update logback to 1.2.0 (#9722)
* update logback to 2.1.0

* udpate jax-rs samples
2021-06-09 10:03:17 +08:00
Bruno Coelho
e600f7d149
[kotlin][client] silence deprecation warning (#9656)
* [kotlin][client] silence deprecated warning when used internally

* [kotlin][client] update sample projects
2021-06-08 23:17:20 +08:00
William Cheng
c379f5bcc4
encode URL parameters (#9688) 2021-06-08 10:02:33 +08:00
William Cheng
37b7c80c4f
null check on $ContentTypes (#9687) 2021-06-08 09:09:21 +08:00
Georgy Ushakov
64ee3fe207
Added support for async accessToken in typescript-fetch (#9659) 2021-06-07 22:15:01 +02:00
Ayman Bagabas
f923a0ef15
Swift5 Vapor 4 client library (#9625)
* [swift5] Add Vapor client library

* Try to improve overall spacing (#17)

* [swift5] try to remove changes in model and api

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* [swift5] update sample projects

* Update samples

* [swift5] vapor: return clientResponse when no default case

* Update samples

Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
2021-06-06 22:08:14 +08:00
Bruno Coelho
0f51662650
[kotlin][client] small improvements (#9640)
* [kotlin][client] standardize adapter type names

* [kotlin][client] remove unused class

* [kotlin][client] fix IDE warning

* [kotlin][client] improve import layout

* [kotlin][client] update sample projects
2021-06-02 11:07:26 +08:00
Ayman Bagabas
9bce71656c
Swift5 namespace changes (#9624)
* [swift5] Rename the API class to {{projectName}}

Instead of {{projectName}}API. This removes some unnecessary naming
complexity.

* [swift5] Define models and Configuration classes under namespace

When swiftUseApiNamespace is set, API classes get defined under the
projectName namespace. This does the same for models and the
Configuration class. Plus adding a deprecation warning when using the
un-namespaced variants.

* [swift5] Use CodingKeys in model decoder

Fixes: 0f5e7d1e3cb9 ("Swift5 models improvements (#9205)")

* [swift5] Add swiftUseApiNamespace to urlsessionLibrary config

* Update samples

* Try to reduce model changes

Co-authored-by: Bruno Coelho <4brunu@gmail.com>
2021-06-02 00:45:01 +08:00
Bruno Coelho
463ae10c4a
[kotlin][client] update dependencies (#9629)
* [kotlin][client] update dependencies

* [kotlin][client] update sample projects

* [kotlin][client] fix update dependencies
2021-06-01 10:09:48 +08:00
Bruno Coelho
6cf4843249
[swift5][client] update dependencies (#9633)
* [swift5][client] update dependencies

* [swift5][client] update sample projects

* [swift5][client] update dependencies in Carthage
2021-06-01 10:09:22 +08:00
Sascha Peilicke
173a349e04
Kotlin: Fix kotlinx_serialization code generation (#9576)
And update to Kotlin 1.5.0 and kotlinx.serialization 1.2.1. Fix nested
enum annotation '@Serializable' instead of '@KSerializable' when
'kotlinx_serialization' is used. Fix missing JsonMediaType in
ApiClient.kt (#9242). Add 'kotlinx_serialization' serialization library
to documentation. Use explicity type in RequestConfig to keep type
information for JSON serialization.

Resolves #9242
2021-05-31 21:48:39 +08:00
Peter Leibiger
afd65b3cb0
Update query parameter sample to include pipe delimiter (#9590) 2021-05-30 17:45:38 +08:00
Bruno Coelho
dee2840b20
[swift5][client] improve docs for Data (#9605) 2021-05-30 17:40:09 +08:00
Peter Leibiger
f7b93ebdf2
Update fake API to contain sample with binary body (#9610) 2021-05-29 10:26:01 +08:00
Stefan Hanselmann
1b6fd2dd7a
[Kotlin][retrofit2] replace okhttpclient with callfactory (#9451)
* [Kotlin][Retrofit][#9448] Replace OkHttpClient parameter with Call.Factory.

* [Kotlin][Retrofit][#9448] Update sample project.
2021-05-28 21:50:28 +08:00
William Cheng
28c3e1d544 update samples, docs 2021-05-28 10:26:48 +08:00
adessoDpd
12c34d4658
New generator: WSDL (#9545)
* init port

* add outputDir

* fill out current .md

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-05-28 10:22:28 +08:00
adameste
73b34ade6a
[cpp-restsdk] Update json double/float parse. (#9577)
* [cpp-restsdk] Update json double/float parse.

Fix cpp-restsdk double and float parse.

double.NaN was parsed when server doesn't ensure the floating point value has decimal point in in.

* Update docs & samples.
2021-05-28 09:58:01 +08:00
William Cheng
32d5900611 update samples, docs 2021-05-27 10:40:32 +08:00
desmese
4f1d8f4699
- added localVar prefix to the contentType variable defined in the api.mustache template in the java resttemplate library (#9568)
- rerun generate-samples.sh and export_docs_generators.sh
2021-05-27 10:24:38 +08:00
Bruno Coelho
a61db6e596
[swift5][client] fix binary response (#9595)
* [swift5][client] fix binary respose

* [swift5][client] fix binary respose
2021-05-27 10:18:51 +08:00
Bruno Coelho
163d13e415
[kotlin][client] fix Android crash on API level 25 and bellow (#9578)
* [kotlin][client] fix Android crash on API level

* [kotlin][client] update sample project

* Try to fix CI

* [kotlin][client] add flag to control android api level supported

* [kotlin][client] update docs

* [kotlin][client] update docs
2021-05-26 18:24:52 +08:00
Blackclaws
e09409fbce
Handle Deserialization Asynchronously (#9424) 2021-05-26 00:12:12 +08:00
William Cheng
ae430a8c14
[cpp][tiny] rename generator, update samples (#9560)
* rename generator, update samples

* add doc

* update readme
2021-05-25 23:55:16 +08:00
Alexandre
6c40192706
[swift5] Add support for oneOfs (#8714)
* [swift5] Add support for oneOfs

* Generate a sample Swift project with oneOfs

* Update Swift Samples
2021-05-24 13:01:16 +08:00
Anders Aaen Springborg
4e48dae8e4
New generator | Arduino cpp (#9489)
* initil tiny client generator

* Helper string

* WIP: added helper file with json helper functions

* WIP: model implementation.. Working on JSON

* Added codegen files for model and helper

* WIP: toJson()

* Added mapping configurations

* Upadet string compare

* Removed redundant namespaces

* Added files for example

* fixed syntax errors

* fixed syntax errors

* header generation

* unittest example for pet class

* Refactored mustache & fixed logical errors

* WIP: unit test mustache format

* Removed legacy file

* mustache service

* Declare service in Java file

* Removed legacy file

* removed legacy code

* Documentation

* Added folder structure + new supporting files

* Added file to run all unittests

* Refactored unit tests

* typemappings and new paths

* First service impl

* Added esp32 and esp8266 env

* Added default values

* Added cli option to specify controller

* added type decl method

* Added stringify methods

* service get requests

* Fix helper header

* post merge fix

* fix long test

* Tiny namespace

* remove shared pointer

* include petapi

* stringify

* return problems

* Canged logic for response-body handling

* Implemented last logic for reponse handeling

* Implemented constructor logic

* first tiny sample

* update basepath to petstore v3

* standard main example

* root certificate example

* root folder

* TODO cleanup

* exclude features

* supports delete again!👷

* remove todo 

* new main example ❣️

* new main example ❣️

* Make our feature set realistic

* fix indentation

* HTTP / HTTPS Connection

* Root certificate sample

* https vs http 👨🏻‍🔬

* fix lint in template

* default value for controller in config

* new readme 📜

* remove old comments

* removed unused testfile

* no default root certificate

* new main

* remove test

* Update platformio.ini.mustache

🤷‍♂️

* Update platformio.ini.mustache

remove native

* added support info

* Add namespace to Pet 🐅

* bourne compatibility fix

* spelling error in python file

* bourne python script 🐍

* Version bump

* Add bourne script to readme

* update main sample, from template

* pre_compiling_bourne.py.mustache to samples folder 📃

* set header Content'type to json

* map todo🗺️

* remove unused debug flag⚒️

* added support for ESP8266 ༼ つ ◕_◕ ༽つ

* added new sample for ESP32 📀

* 🎯

* removed use of namespace std 

* removed use of "__" in variables

* removed unused code in destructor

* fixed type comparison

* move default ctor to header

* added zero initialized primitive variables

* moved variable to TypeMappings

* updated ifndefines

* Extra comment for build error in standard example 🦸🏽‍

* afer cpp-ish cast from std::string to uint8* cast🏰

* excluded maps type

* Documentation og generator

Co-authored-by: kaareHH <kaare.hattel@gmail.com>
Co-authored-by: mkakbas <45030188+mkakbas@users.noreply.github.com>
Co-authored-by: mkakbas <martinkandersen1@gmail.com>
2021-05-24 11:11:44 +08:00
Blackclaws
696bcb3e85
[csharp][httpclient] Remove noncompliant post behaviour (#9427)
* Remove behaviour that does not 1:1 represent spec

* Update samples
2021-05-21 14:50:42 +08:00
Blackclaws
2c4e79f45c
[csharp][httpclient] Introduce FileParameter as an abstraction (#9426)
* Introduce FileParameter as an abstraction

* Update Samples

* Add new file to samples

* Fix hardcoded package name

* Fix hardcoded package name, import FileParameter in Model

* Remove unneccesary warning
2021-05-21 14:49:33 +08:00