876 Commits

Author SHA1 Message Date
William Cheng
8b2de37414
[openapi-normalizer] add a new rule to set tags for all operations (#14794)
* add doc for KEEP_ONLY_FIRST_TAG_IN_OPERATION

* add new rule SET_TAGS_FOR_ALL_OPERATIONS

* better null check

* improve doc
2023-02-24 15:26:34 +08:00
William Cheng
e09196261a
Add rule to simplify oneOf/anyOf (#14777)
* add rule to simplify oneof/anyof

* update doc

* test nullable
2023-02-21 17:39:43 +08:00
William Cheng
c9958e12b8
Add rule to simplify boolean enum (#14764)
* add rule to simplify boolean enum

* update doc
2023-02-21 14:06:24 +08:00
Drago Rosson
2101ea6cf7
Make usage of !include more clear (#14724)
Fixes #14722
2023-02-17 23:44:13 +08:00
Peter Leibiger
1814a04c20
[dart][dart-dio] Bump Dio to 5.0.0 (#14675)
* [dart] Cleanup unused/redundant stuff

* [dart] Bump Dio to 5.0.0

* Fix description

* Get tests to run based with git dependency

* Fix test generation

* Update docs

* Update test dependencies

* Use released version of http_mock_adapter
2023-02-16 01:09:08 +08:00
Andre Vegas
d7edbad8d6
[java][apache-httpclient] update httpclient dependency to the latest 5.x (#14673)
* #14672 - adding generator with apache http client 5

* #14672 - adding generator with apache http client 5

* #14672 - adding generator with apache http client 5

* #14672 - adding generator with apache http client 5
2023-02-15 15:12:39 +08:00
William Cheng
110460b71a
[python-nextgen] better datetime support in parameters (#14621)
* add allowStringInDateTimeParameters option

* add tests

* add files

* add tests for datetime query parameters

* fix file anme

* trigger build

* fix pytest

* install test requirement

* trigger build

* break build

* add new files

* fix Locale.ROOT

* update doc
2023-02-12 21:11:29 +08:00
William Cheng
72c02e4bc1
optionally support float strict type (#14618) 2023-02-12 19:44:18 +08:00
pravussum
4f1708c3fb
[Java/Microprofile] Add support for Jackson serialization & async interfaces using Mutiny in Java Microprofile library (#11554) 2023-02-03 19:39:01 +08:00
William Cheng
6072646899
Cleanup go-deprecated files, go-experimental doc (#14606)
* cleanup go-deprecated files, go-experimental doc

* update readme
2023-02-03 15:14:10 +08:00
William Cheng
31a89e35cb
Prepare 6.4.0 (#14582)
* update to 6.4.0 snapshot

* update samples

* update doc
2023-02-01 22:44:40 +08:00
Sergii Baitala
8d9816e193
[cpp-qt-client] CMake build system improvements (#14210)
* checkpoint

* rename template file

* add nl

* fix build
2023-01-31 23:39:00 +08:00
Paul Parenko
cffe2d0259
[Kotlin-Spring] support to Spring boot3 & jakarta extension (#14369)
* [Kotlin] add spring boot 3 & jakarta extension support

* [kotlin-spring] readme update & modified imports

* use latest Spring Boot starter parent

* use same options as in [Java] generator

* new config kotlin-spring-boot-3

---------

Co-authored-by: jayandran sampath <jayandran.sampath@opencastsoftware.com>
2023-01-31 22:16:06 +08:00
julien Lengrand-Lambert
eca9ec775b
Feat/jetbrains http client (#14477)
* Dummy client generated

* Adding dummy versions, my IDE crashed

* Making my first actual requests

* Creates first version of API Generator for Jetbrains Client

* Adds generated API files

* Adds more complex API definition

* Adds basic supporting files

* Adds empty environment file for variables
* Adds basic README

* Adds minimal set of values in env file`

* Adds minimal support for API Key header

* Adds Adyen API sample

* Add null checks on code

* Simplifies the generator, cleans output

* Improves README

* Fix minor issues with README

* Removes API file and config used for local testing

* Remove leftover logging file

* Disables tests as I find how to write them

* Sets generator as experimental

* Add new generator language enum value

* Adds generator doc file

* Adds generators main file

* Removes unused method. Adds my name

* Adding Jetbrains HTTP Client to the README
2023-01-31 22:03:15 +08:00
William Cheng
37e8cfadc7
minor imrovemets to julia generators (#14560) 2023-01-30 20:20:45 +08:00
William Cheng
fd45b74128
[Java] better default value handling (#14130)
* add test for array default value

* update null return

* minor fixes

* move default value tests to echo api spec

* add new files

* remove unused files

* fix enum array default, add tests

* better array init

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* revert the fix

* improve default value handling

* update native samples, add tests

* update samples

* fix tests

* use conditional test for timezone

* add tests to apache http client echo api

* add option to default container to null

* fix map default value

* minor refactoring

* update samples

* fix javadoc

* fix pom.xml

* add tests in java native echo client

* add java apache client echo tests

* fix test

* fix test

---------

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>
2023-01-30 20:19:00 +08:00
William Cheng
b3527348f3 update doc 2023-01-30 16:58:19 +08:00
Tanmay Mohapatra
4bc16ea6bb
Added a Julia client and server (#14520)
* Added a Julia client and server

This PR adds two new generators for the [Julia language](https://julialang.org/)
- `julia-client` to generate a client from specifications
- `julia-server` to generate a server with stubs that can be used to host a server conforming to the specifications

The generated code uses the Julia [OpenAPI.jl](https://github.com/JuliaComputing/OpenAPI.jl) package that includes support functions for both client and server.

* fix javadoc generation

* add changes after ensure-up-to-date run
2023-01-30 16:40:33 +08:00
Oleh Kurpiak
28493dfa95
[Spring] Spring HTTP Interface library (#14485) 2023-01-30 10:37:00 +02:00
DevFlorian
6a2d8d23da
#8792 [Java] [jaxrs-cxf] "useAbstractionForFiles" config option for jaxrs-cxf (#14316)
* [REQ] Add equals and hashcode to java-cxf pojo #12519

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* [Java] Use abstraction for files for jaxrs-cxf #8792

* fix sample

* fix sample

---------

Co-authored-by: FWermelskirchen <fwermelskirchen@eitco.de>
2023-01-28 11:37:08 +08:00
Michael Ramstein
5047273f1e
[elixir] Properly map AnyType (#14497) 2023-01-24 07:48:49 +01:00
William Cheng
d1cde7febe
Add 2 rules to OpenAPI Normalizer (#14463)
* add REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIIES_ONLY

* add rules to simplify anyOf

* fix rules, update docs

* remove test

* fix doc
2023-01-17 21:27:57 +08:00
William Cheng
079ad1742e
update useRuntimeException description (#14452) 2023-01-13 17:38:31 +08:00
Paul Parenko
c2c91e2d2e
[Java][Spring] Fix #14362 when useSpringBoot3=true, then useJakartaEe=true (#14373) 2023-01-12 19:54:42 +08:00
Maxime Dufour
c6ea564600
[Java][Client Default] Support of AWS Signature V4 (#14287)
* Add support of AWSV4 Signature in Java

* Add Petstore sample for AWSV4 Signature

* Update other sample examples

* Sync Documentation and sample

* Specify only available for okhttp-gson in doc
2023-01-10 19:29:20 +08:00
Dan Michael O. Heggø
3dd313d35c
[typescript] Add importFileExtension option to support ECMAScript module resolution (#14371)
* Rename 'extensionForDeno' to 'importFileExtension'

* Add importFileExtension option to typescript generator

* Fix typo, update docs

* Update docstring
2023-01-03 17:45:49 +01:00
Paul Parenko
456cca1a28
[Java] Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe is enabled (#14343)
* Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe
is true

* generated samples after useJakartaEe changes

* generated docs after useJakartaEe changes
2023-01-02 16:28:44 +08:00
Oleh Kurpiak
7c587ce061
[Java] configurable Javax/Jakarta package (#14310) 2022-12-30 22:33:55 +08:00
William Cheng
b71aecbe9e
Add OpenAPI Normalizer (#14172)
* add x-parent support

* add docstring

* add openapi normalizer rule to use ref as parent in allof

* add openapi normalizer with 1 rule

* revise wordings

* fix javadoc warnings

* better test

* fix docstring

* minor update

* minor improvements

* fix typo
2022-12-30 16:03:21 +08:00
Makoto Aoyama
031f0dcee6
[swift5]Add validation rule and validator (#14218)
* Add validation sample

* Add validation template

* Add access control

* Add rule property for string for numeric

* Add access control

* Remove useless file

* Fix condition

* Add properies for test

* Rename

* Add additional property

* Run ./bin/utils/export_docs_generators.sh

* Add comments for validator

* Rename

* Run ./bin/generate-samples.sh bin/configs/swift*
2022-12-23 13:25:54 +00:00
William Cheng
e6702c5edc update samples and docs 2022-12-21 15:25:09 +08:00
hahny93
851ddecda3
Update Java/Feign api.mustache to accept its own convinience Map Class (#14008)
* Update Java/Feign api.mustache to accept convinience Map

Hi, I just saw, that the generated Map Class is never used outside of tests, but it would be the perfect fit for the changed mehods, as its use-case is exactly the same.

Also a useful change to prevent problems with Collection types and their generics parameters (f.e. Map<x, y>). See: https://stackoverflow.com/questions/62823341/openapi-generator-maven-plugin-breaks-old-feign-with-querymap

* PR checklist

Steps as requested per checklist: done.
2022-12-21 14:44:03 +08:00
William Cheng
0cf5ed619d
Add a new Python client generator - python-nextgen (#14157)
* add python-nextgen generator

* remove client_side_validation from model

* remove configuraiton import from models

* add inheritance support

* update test requirements, tox

* add typings, pydanic to models

* add test model

* minor improvements

* add enum support

* add typing for parameters, remove validations

* add oneof, anyof support

* fix default value

* fix deserialization, api tests passed

* private variable naming, update tests, all tests passed

* remove six

* remove nose

* update doc

* remove sortParamsByRequiredFlag option

* add parameter validation

* add validation tests

* simplify Field()

* remove previous required parameter validation

* improve parameter handling

* support discriminator mapping

* better typing discriminator mapping

* format test code

* fix tests

* fix oneOf from_dict, add test

* add set validation test

* fix nested oneof serialization, add tests

* add model import

* remove models. prefix

* remove import models

* remove model import from api

* simplify from_dict

* add typing for return

* skip pydantic import in return type

* fix tests, fix enum

* restore more enum schema tests

* uncomment enum integer test

* clean up getfullargspec import in model

* clean up getfullargspec import

* fix deserilizatoin for nested oneof

* minor fixes, add tests

* fix regular expression

* add aiohttp samples, add tests

* remove default content type to json

* update template

* fix select accept, content-type

* move tests

* move tests

* fix url query parameters

* fix list

* fix samples

* fix param pydantic, add list as reserved word

* fix auto-generated doc

* fix readme

* fix list, fix special variable name with var_

* fix Literal in python 3.7

* fix default configuration

* fix aiohttp tests

* set default api client instance

* deprecate get_default_copy method

* fix enum model

* fix enum serializatio/deserialization

* add github workflow support

* add regular expression validator

* add enum validator

* better model import

* fix file, remove x-py-import-models

* rename local var

* better model example

* fix regular expression warning, add special_name test, whitelist schema

* skip self import

* update samples

* various fixes

* add base64, json as reserved word

* add http signature support

* add http signature test

* add additioanl properties support in python client

* add decimal support

* use strictstr instead of constr

* fix test with virtualenv

* add nullable support

* add readonly support

* add model name caching

* fix circular reference import

* add onelook discriminator lookup

* add tests

* update samples

* fix locale

* Fix client legacy generator asyncio README code example

* test python-nextgen in circleci

* fix pom.xml

* update python to 3.7.15

* test with python 3.7.12

* various updates

* fix python legacy
2022-12-17 16:05:47 +08:00
John Mitchell
2a33229158
Support for GSON Decoder in Java Feign Generator (#14254)
* Supporting Gson decoder in Feign

* Supporting Gson decoder in Feign

* Fixing test failures - and ensuring Jackson is used as the default if nothing selected (back compatible)

* Adding in sample files

* Updating docs

* Switching to echo server version

* Adding feign-gson to the github workflow

* Empty-Commit
2022-12-17 15:40:14 +08:00
Vladimir Svoboda
d90c9a6f3b
Add support for Angular v15 (#14231)
* Add support for Angular v15

Support for:

- rxjs 7.5.5
- ngPackagr 15.0.2
- zonejs 0.11.5
- typescript >=4.8.2 and <4.10.0

Note that tsTickle is not added to the dependencies when generating for
Angular 15, as:
- it is not a real dependency
- tsTickle is compatible with any of the TypeScript versions that
  Angular 15 supports.

* Generate samples for Angular v15

- typescript-angular-v15-provided-in-root
- typescript-angular-v15-query-param-object-format

* Drop sample typescript-angular-v15-query-param-object-format

* Fix typo

* Add tests for sample

Use credentials instead of api_key to avoid deprecation warnings when
initialising ConfigurationParameters.

* Update samples/client/petstore/typescript-angular-v15-provided-in-root/package.json

* Fix tests by removing context initialisation

Also updated the test dependencies.

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2022-12-09 15:24:55 +01:00
Oleh Kurpiak
2524e8fb0a
[Java][WebClient] global blocking operations config (#14076)
* [Java][WebClient] global blocking operations config

* update samples
2022-12-06 13:30:47 +08:00
Lazzaretti
e2e28a7e0e
[tyescript-axios] fix description for config options: withSeparateModelsAndAp, modelPackage, apiPackage (#14103)
* fix: tyescript-axios description

describe withSeparateModelsAndApi, modelPackage, apiPackage
as mentioned in #5008

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java

* Update docs/generators/typescript-axios.md

Co-authored-by: Fabrizio Lazzaretti <fabrizio.lazzaretti@immosparrow.ch>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2022-12-01 08:05:05 +01:00
William Cheng
9f8ed6b0e2
update customization doc with better example on using the inline schema name mapping option (#14135) 2022-11-29 01:54:28 +08:00
DmitryKubahov
f9d4d28f48
[Micronaut] Improving micronaut-model and micronaut-client generation (#14065)
* fix documentation

* improve build.gradle.mustache and pom.xml.mustache to assume different serialization libs jackson or micronaut-serde-jackson

* improve pojo.mustache to skip generating @JsonDeserialize as for micronaut-serde-jackson

* improve model generating by removing visible flag from @JsonTypeInfo as it is not supported by micronaut-serde-jackson

Co-authored-by: dmitry.kubakhov <dmitry.kubakhov@check24.de>
2022-11-25 15:28:18 +08:00
Oleh Kurpiak
95b566a3a9
[Java] fix additional annotations for oneOf interfaces (#13958) 2022-11-20 12:44:47 +08:00
devhl-labs
74441fde9f
[csharp-netcore] Removed net5, added net7 (#14003)
* removed net5, added net7

* bumped github action dotnet version
2022-11-18 00:50:29 +08:00
Elric Milon
1670e952ff
[Rust] Add support for reqwest-middleware when using reqwest (#13946)
Co-authored-by: Elric Milon <whirm@gmx.com>
2022-11-11 18:25:01 +08:00
William Cheng
099a96b1ad
add option to skip reusing inline schemas (#13892) 2022-11-08 10:48:32 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
cachescrubber
5221682086
[Java][Client] Support annotationLibrary=none to remove swagger annotations (#13869)
* Support annotationLibrary=none in JavaClientCodegen

* Add example using annotationLibrary=swagger1

* Support annotationLibrary=none in libraries

* Fix missing curly brace.

* fix if statement condition

* Support {{#swagger1AnnotationLibrary}} in java/rest-assured

* Adopt JavaModelTest

* Generate docs

* Generate samples

* clean up java feign files

* clean up feign samples

* fix resttemplate, native

* fix resttemplate withXml

* fix webclient

* fix java-jersey2, vertix

* fix googleapi client

* fix rest assured

* fix rest assured

* update apache-httpclient

* fix jersey2 special character

* fix resteasy

* fix jersey2

* update samples

* fix jersey2, okhttp streaming

* update okhttp-gson

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-11-04 17:07:46 +08:00
William Cheng
06354d5f7d update doc 2022-11-01 18:32:08 +08:00
cachescrubber
b54299fffa
Spring request mapping mode (#13838)
* Introduce RequestMappingMode option

* generate docs

* Add test case using interfaceOnly

* Generate Samples

* Add requestMappingMode: iface to bin/configs/spring-boot-oas3.yaml

* Restore #12250: Move Feign Client url parameter under condition.

* Rename iface to api_interface.
2022-11-01 09:44:01 +08:00
Eric Haag
684e7a063c
Add missing property to Java Helidon docs (#13861) 2022-10-30 21:43:29 +08:00
Thibault Duperron
574a70c315
[JAVA] Handle camlCase with $ as first char (#13292)
* Lowercase first char and not first letter for variable names

* Samples

* Limit caml case fix impact with cli a property
2022-10-28 21:36:04 +08:00
William Cheng
a66874f8f9
remove beta in faraday library support (ruby client) (#13823) 2022-10-26 15:14:30 +08:00