20229 Commits

Author SHA1 Message Date
Rodrigo de Almeida - RMA3
e07069731d
[JAVA] Enumeration comparison in Java using equalsIgnoreCase when String - Fix issue 8084 (#15273)
* fix issue 8084

* add config

* add config

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2023-04-28 17:27:41 +03:00
William Cheng
64c3be93a8 fix URL to 6.6.0 snapshot version 2023-04-28 14:08:18 +08:00
William Cheng
2bd1a15217
[python-nextgen] fix empty dict in body parameter (#15336)
* add more tests for python-nextgen

* update samples

* add fix for empty dict body

* update samples
2023-04-28 14:06:27 +08:00
William Cheng
f4c041e496
fix to_json, to_dict in python nextgen (#15337) 2023-04-28 14:04:30 +08:00
William Cheng
f4e0eb9bc9
Update git-commit-id maven plugin to newer version (#15332)
* update git commit plugin to newer version

* roll back to previous version
2023-04-28 08:45:14 +08:00
Oleh Kurpiak
1f23b019fa
[Spring] fix Paginated without params (#15315) (fix #15265) 2023-04-27 14:32:11 +03:00
Tiffany Marrel
da96058f5b
[kotlin] cleanup documentation (#15307)
* [kotlin] fix documentation of API authorization in README files

fix hierarchy level + add internal links + align wording across generators

* [kotlin] fix anchor links in documentation

---------

Co-authored-by: Tiffany Marrel <tiffany.marrel@flowable.com>
2023-04-27 11:33:15 +01:00
William Cheng
e211e1451d
update extension to 1.17, update config (#15326) 2023-04-27 15:01:09 +08:00
martin-mfg
e0f42961c5
add missing documentation for maven and gradle options (#15322) 2023-04-27 12:43:37 +08:00
CTerasa-ep
b847140834
[C++][Pistache] Generate API generalization interface (#15279)
* [C++][Pistache] Refactor setupSupportingFiles

Supporting files are set up in the CppPistacheServerCodegen()
constructor as well as in processOpts(). Refactor the code and extract a
method setupSupportingFiles().

* [C++][Pistache] Refactor: Simplify isQueryParam condition

Both branches of the if/else do the same steps. Refactor this out and
invert logic.

* [C++][Pistache] Refactor: Add injectImplInFilename

Both branches of the if/else if do the similar steps and are dependent
on the suffix. Make this obvious by introducing a new method
injectImplInFilename(String result, String suffix).

* [C++][Pistache] Refactor: injectImplInFilename: remove index search

We do not need the separatorChar index to inject the "Impl" string.
Simply truncate the whole string.

Also rename the parameter from 'result' to' filename'.

* CppPistacheServer: Refactor postProcessOperationsWithModels

Pull out the post-processing for a single operation, and also pull out
post-processing for parameters.

Introduce boolean expressions for supported parsing per parameter, and
consumption of JSON.

Reorder code to make locality more explicit i.e. how consumeJSON and
isParsingSupported is generated and used.

* CppPistacheServer: Refactor to use functional matching

Functional matching like anyMatch() directly state what boolean value is
 searched.

 However, the Predicates deserve to heave names themselves.

* CppPistacheServer: Add base class for Api

Looking at the generated main-api-server.cpp code it gets obvious that
the API classes are self similar with a similar interface.
Only the construction and teh initialization is called in the main()
function. Leverage this fact to create a generalization ApiBase.

Introduce ApiBase as a pure virtual base class to the concrete API
classes and declare init() as virtual.

Pull the route member into the base class.

With this change we could have a container hold all the ApiImpl
objects later and call init() on all of them using a for_each loop.

* CppPistacheServer: Use ApiBase for ApiImpl storage

Refactor the main-api-server template to use a vector for ApiImpl
storage instead of separate objects. This leverages the previously
added ApiBase generalization.

 We push all concrete ApiImpl objects into a vector and call init() on
  each of them.

* [C++][Pistache]: Update generated sample

Due to teh addition of ApiBase class update the generated sample.

* [C++][Pistache] Add comment for postProcessSingleParam

* [C++][Pistache] Rename and comment implFilenameFromApiFilename

While writing the comment, I realized that the method name could be more
precise. Thus rename injectImplInFilename to implFilenameFromApiFilename
and add comment.
2023-04-26 20:01:58 +08:00
William Cheng
b8ccd25a79
[python-nextgen] Various fixes reported by pylint (#15309)
* various pylint fixes

* rearrange test

* Revert "rearrange test"

This reverts commit 24d777a8a87161b6fc36527f6c1a06c03216bb64.
2023-04-26 17:12:10 +08:00
Beppe Catanese
6f24ad3625
[JAVA] OkHttp-GSON deprecated field only deprecates getter method (#15287)
* Deprecate build and setter methods

* Test with deprecated property

* Update samples

* Remove extra line

* Regenerate samples
2023-04-26 11:40:30 +08:00
Jaemin Park
de27749047
[cpp-ue4] Fix byte array writing in JSON to be valid base64 string (#15242)
* Fix byte array writing in JSON to be valid base64 string
- remove ToStringFormatArg
- use ToUrlString to path parameters
- use Base64UrlEncode only in ToUrlString

* Use LexToString instead of FString::Format
2023-04-25 00:21:27 +08:00
William Cheng
d6e19f8f55
fix minus sign in enum naming in python-nextgen (#15291) 2023-04-24 16:07:29 +08:00
William Cheng
52417f0597
use Field(...) for required properties in python-nextgen (#15290) 2023-04-24 16:07:09 +08:00
Dávid Gracza
98c2794b5d
[Kotlin-Spring] add Kotlin based Spring-cloud openfeign generator (#15048) 2023-04-24 16:02:00 +08:00
William Cheng
e51908f176
[openapi-normalizer] Fix nullable boolean check in oneOf schema (#15276)
* fix nullable boolean check in oneof

* minor fix

* fix spec
2023-04-22 16:39:12 +08:00
William Cheng
b5745e6f26
[python-nextgen] Fix enum query parameter (#15278)
* fix enum query parameter in python-nextgen

* update samples
2023-04-22 16:08:59 +08:00
Matheus Teles
33e0c6775f
Update beanValidationCore.mustache (#13631) (fix #3519)
* Update beanValidationCore.mustache

Update to use x-pattern-message for message customization

* Update spring.md

Update this page adding documentation for x-pattern-message

* added unit test
meet requested corrections

* build the project

* remove space

---------

Co-authored-by: Rodrigo de Almeida - RMA3 <rodrigo.ma3@gmail.com>
Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2023-04-21 10:08:27 +03:00
Ivo Wever
2679819694
[Ruby] Client: fix base_url when no server_operation_index is defined (#15162)
As discussed in https://github.com/OpenAPITools/openapi-generator/pull/7415#discussion_r1113274416, it seems unlikely the code was correct.

server_operation_index is a hash table. In Ruby, `hash[key]` will return the value associated with `key`. If key is absent, `nil` is returned. Because that is sometimes undesirable, there is also `hash.fetch(key)`, which raises an error if the key is absent. It also allows you to specify a default to fall back on: `hash.fetch(key, default)` will return `default` if the key is absent.

So, since not all users will specify a 'server per operation' (or at least: I'm not), the old code would usually set `index` to the `server_index`, which is initialized to 0. The subsequent `if index == nil` will usually return false (`0 != nil` in Ruby), after which the `server_url` call on line 177 constructs the url based on the `server_operation_variables` and `operation_server_settings`, assuming we are dealing with the case where a server per operation is configured. The case where the url should be constructed from `scheme`, `host`, etc. is only called if either `server_index` is explicitly set to `nil` or the key `operation` is explicitly associated with the value `nil` in the `server_operation_index` hash table, both of which seem inappropriate.
2023-04-21 11:11:42 +08:00
Jaemin Park
e6c64d3917
Fix multi collection format has duplicated prefix (#15260)
Co-authored-by: Jaemin Park <nullbus@nm-fc.com>
2023-04-21 11:08:32 +08:00
Rodrigo de Almeida - RMA3
2c78ff78ed
Fix issue 15264 - Replace @Controller with @RestController when using useSpringController (#15266)
* fix issue 15264

* If useResponseEntity true then keep @Controller if not @RestController

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2023-04-20 18:35:09 +03:00
Oleh Kurpiak
ede1c9ca3e update samples 2023-04-20 17:47:44 +03:00
Vidur B
564a86ccda
fix: set final query parameter value to enum value (#15133)
Use `<enum>.value` for query parameters that take an Enum, as otherwise the `name` of the enum will be used.
2023-04-20 15:54:57 +08:00
William Cheng
90d7da0b5f fix travis badge in readme 2023-04-20 14:17:17 +08:00
William Cheng
fdf53ac01e
update mvn in workflow to use gradle enterprise (#15256) 2023-04-19 16:17:45 +08:00
William Cheng
0176957e26
[python-nextgen] better sample code (#15248)
* better python-nextgen sample code

* remove future import

* fix signing doc

* better test

* use hasHttpBearerMethods instead
2023-04-19 15:55:06 +08:00
yateeshc
e3fdac0711
rename hasBearerMethods to hasHttpBearerMethods (#15259) 2023-04-19 15:20:04 +08:00
Rodrigo de Almeida - RMA3
9b2917f3a9
Fix issue 12341 (#15234)
* if method return type is void then no return

* build the project

* fix build the project

* fix build the project

* fix return

* fix build the project

* fix build the project

* fix build the project

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2023-04-18 23:56:12 +03:00
William Cheng
f5b4490bc9
[python-nextgen] Fix dict of dict of object in python-nextgen (#15239)
* fix dict of dict of object in python nextgen

* update samples
2023-04-18 14:59:08 +08:00
William Cheng
1881100742 use png version of pinterest logo 2023-04-18 12:00:41 +08:00
William Cheng
1ac39c7fa9
add Pinterest to the user list (#15247) 2023-04-18 11:51:53 +08:00
William Cheng
58425f54c0
Add workflow for gradle enterprise (#15211)
* add workflow for gradle enterprise

* add xml files

* remove build cache

* install

* update

* just clean

* trigger build

* mvn clean install
2023-04-18 11:38:53 +08:00
Robin Karlsson
91815bf555
[java] Fix anyof generics (#15210) (#15230) 2023-04-17 14:43:19 +08:00
André Andersson
096aabd360
Fix printing empty notes (#15238) 2023-04-17 14:42:30 +08:00
William Cheng
70a6106626
add null check in string with regular expression (#15233) 2023-04-16 23:46:17 +08:00
Robin Karlsson
738beb401e
[java][jersey] Fix UUID path parameters (#15114) (#15229) 2023-04-16 23:32:15 +08:00
Dennis Kugelmann
03359ae4d5
[pub] Add repository and publish_to as configurable option in pubspec.yaml (#15232)
* Add repository as configurable option to pub client libraries

* Generate files

* Make repository null by default

* Update pubRepository mustache template

Co-authored-by: Ahmed Fwela <63286031+ahmednfwela@users.noreply.github.com>

* Regenerate samples and documentation

* Support setting publish_to in pubspec.yaml

---------

Co-authored-by: Ahmed Fwela <63286031+ahmednfwela@users.noreply.github.com>
2023-04-16 21:37:29 +08:00
Noor Dawod
cbf5598c59
Fix generated code when a list is actually a set. (#15027) 2023-04-16 21:32:59 +08:00
William Cheng
7a41231721
minor bug fix to openapi normalizer (#15225) 2023-04-15 22:00:03 +08:00
William Cheng
9ad695d52c
better npe in processUseAllOfRefAsParent (openapi normalizer) (#15224) 2023-04-15 15:54:54 +08:00
William Cheng
c5a8fafc3d
remove deprecated warning (#15223) 2023-04-15 15:24:14 +08:00
William Cheng
5832731c0e
[java] Update undertow to newer version (#15222)
* update undertow to newer version

* fix
2023-04-15 14:56:48 +08:00
Tom Sanidas
6a67551ea5
Issue 3175 - using @objcMembers to expose all props and funcs to ObjC code when objcCompatible is requested. (#15188) 2023-04-14 09:31:59 +01:00
John Dimeo
90b78fe97e
Jersey2/3 - Probe content type for multipart upload parts (#14965)
* Probe content type for multipart form uploads since many servers require each part to correctly identify its type.

* Update samples

* Add explanatory comment

* Update samples with comment
2023-04-14 12:15:13 +08:00
Robin Karlsson
b247ad75e1
[java] Add public static version field (#15108) 2023-04-14 01:06:54 +08:00
Barnaby Court
53d9d30834
For microprofile java - use {{rootJavaEEPackage}} instead of {{javaxPackage}} (#15179) 2023-04-14 00:59:33 +08:00
André Andersson
241d649164
Fix list of type not including correct import (#15171) 2023-04-14 00:14:28 +08:00
Andrii Serkes
60e6d2d57f
fix Jsonb issue for Helidon SE Client generator (#15146)
Signed-off-by: aserkes <andrii.serkes@oracle.com>
2023-04-13 23:28:12 +08:00
Ween Jiann
1163b9cd3b
[go-server] Fix: name declared and not used (#15201)
* Fix: name declared and not used

* Update samples

* Re-enable workflow
2023-04-13 11:04:00 +08:00