11973 Commits

Author SHA1 Message Date
William Cheng
928070c57a
Prepare 6.1.1 SNAPSHOT version (#13399)
* prepare v6.1.1

* update samples

* update doc
2022-09-11 19:08:23 +08:00
William Cheng
43dbb5ff9c
6.1.0 release (#13398) 2022-09-11 17:16:07 +08:00
Segev Finer
9753086bcb
Fix #13369: kotlin-client with okhttp doesn't escape path parameters with slashes correctly (#13370)
* Fix #13369

* Regenarate samples

* Fix support for okhttp3
2022-09-09 16:31:31 +08:00
kmaginot
0b6604504c
[Java][Feign] convert expirationTimeSeconds to milliseconds (#13361) 2022-09-09 00:00:17 +08:00
Hui Yu
6755032dcc
[C][Client] Treat "null" as a valid value for a field of a JSON map (#13352) 2022-09-08 22:33:49 +08:00
William Cheng
f98753aa8b
[R] support explode (true/false) in query array parameters (#13364)
* fix query parameters (explode or not) in r client

* add tests
2022-09-07 12:21:13 +08:00
Dennis Hartrampf
4c19eca929
Escape quotes in example of array type (#12505)
Escape quotes in example of array type in Schema and ApiModelProperty annotations
2022-09-06 23:49:34 +08:00
William Ghelfi
86d6511449
Mark overrides in typescript-fetch and typescript-rxjs (#13322)
* feat(typescript-fetch): mark overrides

fix #12948

* feat(typescript-rxjs): mark overrides

fix #12948
2022-09-06 09:31:43 +02:00
Justin Black
c4d56afcae
[python-experimental] adds test verifying inheriting from multiple AnyType classes (#13358)
* Adds test_additional_properties_validator

* Updates test

* Reverts file
2022-09-05 17:18:51 -07:00
Justin Black
2c5eb54f11
[python-experimental] Improves additionalProperties processing when additionalProperties is unset (#13347)
* Adds NotAnyTypeSchema

* Unit test sample regenerated

* Turns parameter tests back on

* Removes unused from_server_types

* Reverts version files

* Samples regerated with fixed type hints

* Further fixed type hints
2022-09-05 13:17:48 -07:00
Justin Black
f139c090e5
[python-experimental] adds and uses regex patterns for json + filename detection (#13357)
* Unit test sample regenerated

* Reverts version files
2022-09-05 11:03:57 -07:00
Justin Black
cb8d9d5bfe
[python-experimental] adds new json content type (#13356)
* Adds json detection for application/json-patch+json

* Adds jsonPatch route and schemas

* Adds test_json_patch

* Unit test sample updated

* Reverts version files
2022-09-05 09:37:01 -07:00
Ahmed Fwela
2a8ea162d7
[dart-dio] handle polymorphism + discriminator serialization (#12295)
* return structured serializer

* generate samples

* implmented postProcessAllModels to fix assignment of inherited models

* Templates now respect inheritance

* regen dart samples

* only built value support for now

* ignore unused elements

* fixed tests

* new configs to test oneOf

* add some helper vendorextensions for oneOf support

* update templates

* regen samples

* resolve conflicts

* fix missing serializers

* Updated samples and fixed merge conflict

* updated samples

* Follow java conventions

* Follow java conventions

* updated samples

* update sampels 2

* update samples 3 ...

* fix underscores

* fixed missing imports from java code

* update config names

* updated samples

* updated built_value deps

* regen samples

* workaround built_value abstract builders google/built_value.dart#1180

* regen samples

* updated test pubspec

* temp fix rewriteImports for Lists and maps

* Add new samples to CI

* Improve white spaces & formatting

* fix enums not getting assigned correctly

* update samples

* fixed typo

* regen samples

* remove repeating imports

* regen samples

* ignore unused_element warning

* updated tests

* regen samples

Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
2022-09-05 16:44:04 +08:00
William Cheng
6c9421684a
escape % in description in r model @field (#13353) 2022-09-05 11:37:24 +08:00
William Cheng
f0d8c3e735
fix query parameter in r client (#13348) 2022-09-05 03:44:22 +08:00
William Cheng
513496a399
fix allVars to handle empty string and more (#13346) 2022-09-05 02:50:59 +08:00
Justin Black
5251a1b739
Adds isBooleanSchemaTrue/False getters and setters (#13341)
* Adds getters and setters for boolean schema true and false

* Updates CodegenModel

* Updates codegenProperty

* Updates codegenparameter and codegenresponse

* Adds comments describing the new properties

* Updates additionalProperty setting for python-experimental

* Sample regenerated

* Docs updated

* Do not write additionalProperties when they are unset

* Updates criteria for when DictSchema subcalsses are created

* Adds NotAnyTypeSchema when a schema is False

* Updates new kwargs signature

* Updates get_item type hints

* Updates sample, readme updated

* Simplifies method calls

* Adds get_item_oapg, removes unset from get_item and getattr

* Sample regenrated

* Fixes tests

* Raises AttributeError if a property is not required and it is dotname accessed

* Fixes one test

* Fixes 3 tests

* Fixes test

* Fixes two more tests

* Fixes test

* Fixes two tests

* Fixes two tests

* Tests fixed

* Unit test sample regerated, fixed unset addprops required type hint issue

* Migration guide updated

* Samples regenerated
2022-09-04 11:40:15 -07:00
William Cheng
c81c103572
[R] Remove obsolete importMapping code, add tests (#13345)
* remove import obsolete code, add tests

* remove man fodler

* update .gitignore
2022-09-05 00:21:52 +08:00
mm's
ef6d383433
Feature/update kotlin dependecies template (#12966)
* update Kotlin & Ktor versions

* update samples

* fix gradle version

* update the ktor client templates and project samples

* update the ktor client templates and project samples

* revert multiplatform upgrade

* update kotlin multiplatform

* upload kotlin Multiplatform samples

* fix gson ktor sample

* update samples

* fix: unused imports

* fix imports of ApiClient

* update kotlin samples
2022-09-04 23:27:24 +08:00
Bill Collins
f6be1d07bc
Do not generate new models for readonly schema references (#13303)
* Add example of nested schema issue

* Add failing test case

* Special case properties with a single allOf and readonly

* Remove rogue file from FILES
2022-09-04 18:01:55 +08:00
Sergey Prytkov
2a007b3465
Fix generation of default array values for kotlin client (#13243)
* Fix generation of default array values for kotlin client

* rerun generation scripts

* replace list of enum with list of string
2022-09-04 17:43:09 +08:00
Rostislav Krasny
4694a9f0af
[maven] Use one of two default paths of output directory according to the lifecycle phase (#13151)
In case the lifecycle phase is "generate-test-sources" the default output directory is:
"${project.build.directory}/generated-test-sources/openapi"

In case of any other lifecycle phase the default output directory is:
"${project.build.directory}/generated-sources/openapi"

Also use the "src/main/java" as the only default source folder in the output path for both
cases when addCompileSourceRoot == true and when addTestCompileSourceRoot == true.
In case you really need "src/test/java" it still can be set in the configOptions manually:

    <configOptions>
        <sourceFolder>src/test/java</sourceFolder>
    </configOptions>
2022-09-04 17:21:16 +08:00
Michael Edgar
afd357be8a
fix: ensure Resteasy JAX-RS Response object closed (#13333)
Signed-off-by: Michael Edgar <medgar@redhat.com>

Signed-off-by: Michael Edgar <medgar@redhat.com>
2022-09-03 23:40:13 +08:00
William Cheng
2bfbb87862
move print to public method, leave commented code to lock, unlock the class (#13342) 2022-09-03 14:03:03 +08:00
William Cheng
b6576d1173
[R] Update fromJSON to handle additional properties (#13331)
* update fromJSON to handle additional properties

* update RoxygenNote to newer version
2022-09-02 09:46:56 +08:00
Jonas Reichert
fea42b547e
[swift5] distinguish (un-)authenticated requests (#13321)
* add isRequestAuthenticated to request builder

* update samples

* improve samples
2022-09-01 09:18:22 +01:00
Justin Black
62e28a27dd
[python-experimental] improves method names (#13325)
* Replaces all validate methods with public validate ones

* More methods made public with _oapg suffix

* Makes methods private where one can

* Fixes tests

* Fixes typo, maked Disciminable methods public

* Method changed to from_openapi_data_oapg

* Fixes tests for from_openapi_data_oapg

* Tweaks endpoint stub so the endpoint exists for ycharm type hints

* Makes Api methods protected

* Adds binary python type hints, makes get_new_instance_without_conversion_oapg public

* Protects some schema methods

* Protects more schema methods

* Renames as_x, is_x acessors with needed suffix

* Fixes some tests

* Fixes tests, fixes new signature for DateSchema

* Methods removed and made private

* Fixes indentation

* Samples regenerated
2022-09-01 00:34:05 -07:00
William Cheng
d1f44e8a7e
fix http basc auth in R client (#13330) 2022-09-01 14:14:08 +08:00
Justin Black
225204093f
[python-experimental] adds NullableX base class mixins, fixes additionalProperties type hint (#13323)
* Makes additionalProperties type hint include Unset

* Adds 2-class Mixins

* unit test sample regenerated

* Reverts version files
2022-08-31 12:16:53 -07:00
Jonas Reichert
7af9f9c7e7
[swift5] explode query params only if necessary (#13202)
* propagate explode option to mapValuesToQueryItems

* regenerate swift5 samples
2022-08-31 20:50:25 +08:00
William Cheng
cebdbb6a11
add additional properties support in r client (#13317) 2022-08-31 15:06:40 +08:00
Justin Black
d63caf2539
[python-experimental] improves type hints of optional object properties (#13314)
* Adds Unset type hint for use cases containing additional properties

* Simplifies no addProps type hint template

* Unset type hints added when additionalProperties are off

* Adds __getitem__ unset fix

* Adds unset test

* Fixes non overload method when addprops are present

* Sample regenrated, tests added, readme updated

* Unit test sample updated

* Reverts version files
2022-08-30 16:44:30 -07:00
Justin Black
a294456695
[python-experimental] adds dict["key_name"] type hints (#13309)
* Uses frozendict module import in schemas and api_client

* Regnerates sample

* Adds overload type hints

* Adds __getitem__ methods for invalidly name properties

* Fixes code that instantiates referenced schemas in object payloads

* Fixes getitem literals containing control charaters

* Sorts params by required, adds type hints for properties with addProps turned off

* Unit test spec sample regenerated

* Adds stub files for models and endpoints

* Omitting some endpoint info from endpoint stub files

* Removes more from endpoint stub

* Deletes all except for schema definition in endpoint stubs

* Removes simple validations from stubs

* Removes endpoint parameter deifnition from endpoints stubs

* Removes unnecessary ../ stub variable access

* Samples regenerated

* Samples regenerated, fixed handling of invalidly named properties

* Samples regenerated

* Reverts version files
2022-08-30 11:51:31 -07:00
Jaemin Park
9b9d3200a8
[cpp-ue4] Support UE5 version of FTickerObjectBase (#13304)
Co-authored-by: nullbus <nullbus@nm-fc.com>
2022-08-29 21:27:35 +08:00
Julian Kalinowski
2c0d886a1d
[swift]: support uuid in FormDataEncoding (#13228) 2022-08-29 18:43:47 +08:00
Lukas Woodtli
27f3a5c36d
Small fixes and cleanup on cpp-restbed-server (#13305)
Some small issues sneaked into the improved restbed generator.
2022-08-29 18:26:13 +08:00
Savitha M R
522a5df24a
[csharp-netcore] To support Secret API key input as string (#13276)
* To support api secret key to take input as string.

* To support Secret API key input as string

Co-authored-by: Savitha M R <savitha.m@maplelabs.com>
2022-08-29 18:17:30 +08:00
Justin Black
d97081e7dc
[python-experimental] improves type hints for arrays, and object required properties (#13299)
* Regenerates sample with additional enum values

* Sample regenerated, array type hints working

* Unit test sample regenerated

* Removes unneeded __getattribute__

* Sample regenerated using getRequiredVarsMap for property type hints

* Adds schemaFromAdditionalProperties to tell if a CodegenProperty is from properties or additionalProperties

* Adds get/setSchemaIsFromAdditionalProperties

* Updates codegenModel

* Updates codegenParameter

* Updates codegenResponse

* Uses setSchemaIsFromAdditionalProperties

* Fixes array new typ ehint and additional property type hints

* Samples regenerated

* Adds missing parms to javadoc

* Fixes param name

* Adds missing param to javadoc
2022-08-28 21:18:18 -07:00
William Cheng
b55fa261f3
add oneOf discriminator lookup support (#13301) 2022-08-29 01:24:01 +08:00
William Cheng
a582c38aa1
[R] override print, lock classes (#13300)
* override print, add lock

* add print, lock class to anyof/oneof
2022-08-28 18:03:59 +08:00
William Cheng
0d68f29d71
[R] Better rdoc (#13275)
* better rdoc

* update doc

* update samples
2022-08-28 10:17:59 +08:00
William Cheng
66ecfb62c3
[R] minor bug fixes in oneOf, anyOf (#13298)
* update oneof to handle primitive types in r client

* add support for primitive type support in anyOf in r client

* remmove lock
2022-08-28 09:36:45 +08:00
Lukas Woodtli
d2e60f59b3
Cpp restbed server improvements (#13030)
* Keep old implementation of cpp-restbed generator as cpp-restbed-server-deprecated

* Refactor operation path processing

* Restructure samples directory to better allow writing tests

* Improve templates for cpp-restbed-server

Improve templates

* Add integration tests

* Improvement in templates for cpp-restbed-server

* Fix tests

* Improve cpp-restbed generator

* Improve cpp-restbed-server

* Add more tests

* Add suppoert for arrays of enums in query params

* Generate CMakeLists.txt

* Small improvements and example in Readme

* Add integration tests to maven project

* Update doc
2022-08-27 18:10:28 +08:00
Scott Coldwell
eaa80be526
Fix for issue 13272 - Syntax error in generated html (#13293) 2022-08-27 13:42:11 +08:00
William Cheng
b7c224b374
minor enhancement to the JS apollo generator (#13297) 2022-08-27 13:39:58 +08:00
William Cheng
97946e421f
fix protobuf variable name (#13296) 2022-08-27 13:31:24 +08:00
João Neto
62a0878bae
Combine javascript and javascript-apollo generators (#13270)
* Combine javascript and javascript-apollo generator functionality

* Combine javascript and javascript-apollo templates

* update configs

* deprecate javascript-apollo generator

* bonus magic string deletion 

* update samples

* update generator docs

* fix: include .babelrc in apollo generation

* update samples

* update samples

* rename javascript-apollo to javascript-apollo-deprecated

* fix javascript apollo library template

Apollo library now uses the partial_model_generic template file from the ES6 library, as it includes many fixes and improvements (including handling models with ill-named attributes)

* update samples

* Create javascript-apollo-deprecated.md

* Updated javascript generator template's gitignore

Updates .gitignore with that from https://github.com/github/gitignore/blob/main/Node.gitignore

Main reason for the update is to ignore the 'dist' folder with compiled files by default.

* javascript generator: merge api_test template files

The only difference is that Apollo is not designed for browser, so having a "if(browser)" check is useless, but doesn't hurt.

* update docs

* cleanup

* avoid possible config clash

* update javascript-apollo sample

* update javascript-es6 sample

I kept the pom.xml from before

* update javascript-promise-es6 sample

kept pom.xml

* update samples
2022-08-27 13:29:35 +08:00
William Cheng
2c22a01779
fix return in r (#13294) 2022-08-27 10:14:10 +08:00
Justin Black
fe934dc1b4
[python-experimental] improves type hints (#13271)
* Templates updated, dict properties moved into Meta

* Fixes tests

* Renames _discriminator to discriminator

* Moves required vars into required

* Renames _additional_properties to additional_properties

* Adds MetaOapgTyped

* Adds type hints for MetaOapg to classes that neen it

* Adds StrMixin

* Adds DecimalMixin

* Adds BoolMixin

* Adds NoneMixin

* Adds TupleMixin

* Adds FrozenDictMixin

* Regenerates unit test samples

* Only quotes type hints if they are imported

* Moves _items into Meta

* Renames _items to items, various small type hint fixes

* Adds type hints for object model new signature

* Adds type hints for body schema primitive types

* Adds primitive types to all query/path/header/cookie params

* Samples regenerated for unit test api

* Version files fixed
2022-08-26 07:09:08 -07:00
snebjorn
50a9d3323a
fix: [typescript-angular] .join does not exist on type Set (#13278)
fixes #11782
2022-08-26 12:47:58 +02:00