18059 Commits

Author SHA1 Message Date
David Miguel Lozano
92a5544ba0
Fix model package name import in Dart json_serializable (#12615) 2022-07-07 01:22:02 +08:00
Sascha Peilicke
42a45e1a1c
Gradle Plugin: Clean up Kotlin code (#12720)
Fix typos, unused imports and formatting issues. Remove @Supress
annotations that are no longer necessary
2022-07-07 01:19:16 +08:00
Thomas Hansen
1a44a5284a
[PHP] Fix message for InvalidArgumentException(), when failing to test pattern (#12780)
* [BUGFIX] model_generic.mustache: Display property name instead of its value, when throwing InvalidArgumentExeption() for values not respecting a given pattern

* [AUTOGENERATED] Generated files
2022-07-07 01:17:22 +08:00
Tom Bärwinkel
ac9e595476
Use the first status code in 2XX range, fallback to 200 (#12637)
This is in line with the OpenAPI specification:

The Responses Object MUST contain at least one response code, and
it SHOULD be the response for a successful operation call.

and excludes the 2XX range response itself.
2022-07-07 01:14:32 +08:00
Tom Bärwinkel
728c80abea
Add option to use custom a monad (#12618) 2022-07-07 01:13:06 +08:00
Gaëtan Duchaussois
cb1ba17877
Rust: fix for required nullable input (#12485)
Co-authored-by: Gaëtan Duchaussois <gaetan.duchaussois@craft.ai>
2022-07-06 17:25:15 +08:00
William Cheng
f5b5feb58d
remove warnings related to escaping the characters in the md generator (#12774) 2022-07-06 14:19:40 +08:00
William Cheng
1383be4a2e
Fix missing import in jaxrs pojo (#12766)
* fix missing import in jaxrs pojo

* trigger build failure

* Revert "trigger build failure"

This reverts commit 4eed12f850cbc008404b0dc2284245f3d3ce4a15.
2022-07-05 17:12:26 +08:00
Bogdan Ilchyshyn
97daba5c58
fixing error handler interceptor (#12761) 2022-07-04 09:06:34 +02:00
William Cheng
2f81e2d9e1 update readme with next release info 2022-07-04 01:41:44 +08:00
William Cheng
6cae0fbb78 Merge remote-tracking branch 'origin/6.1.x' 2022-07-04 01:22:51 +08:00
William Cheng
9e412edb64
Prepare 6.0.1 release (#12762)
* update to v6.0.1

* update doc

* update samples
v6.0.1
2022-07-03 23:36:46 +08:00
Oleh Kurpiak
d36dabaf77
[Java][microprofile] fix constructor creation (#12627) 2022-07-03 17:54:55 +08:00
Gabriel Mazetto
b97a4ad12a
Generate .gitlab-ci.yml files for Ruby template (#12750) 2022-07-03 17:52:32 +08:00
William Cheng
2d3bfaf96d
Add schema mappings (#12600)
* add option schema mappings

* add schema mapping support, update tests

* minor fix

* update other generators, tests
2022-07-03 17:46:39 +08:00
William Cheng
72b4189f76 add back elixir petstore test-related files 2022-07-03 17:34:11 +08:00
Austin Ziegler
18a07eab37
Improved Elixir Code Generation (#12751)
* Bump the minimum version of Elixir supported

The previous minimum version of Elixir is several years EOL.

The current minimum version of Elixir is also EOL, but is the minimum
version required to support some upcoming changes to the config
templates.

* Bump the minimum version fo Tesla

Keep the dependencies up to date

* Add a default .formatter.exs

* Add two Elixir-specific mustache lambdas

- The `atom` lambda results in the proper quoting of an atom depending
  on the safe contents of the atom text, per the Elixir language
  specification. That is, `{{#atom}}foo{{/atom}}` will be turned into
  `:foo` and `{{#atom}foo.bar{{/atom}}` will be turned into
  `:"foo.bar"`.

- The `env_var` lambda results in the treatment of the identifier
  provided being capitalized as an environment variable would be.
  `{{#env_var}}apiVersion{{/env_var}}` would become `ENV_VAR`.

* Use modern Elixir configuration

- This includes runtime configuration
- It depends on the `env_var` lambda.

* Fix a Language Server Warning

This change is *optional*, but removes a LS warning that was raised.

* Regenerated openapi_petstore for Elixir

* Add ex_doc as a default dependency

Fixes #12484

* Refine the regular expression for atoms

The original regex incorrectly matched `123Number` (unquoted atoms
cannot begin with numbers) and would incorrectly quote atoms ending in
`?` or `!`. Through testing with `iex`, it also turns out that the atom
`:-` is legal.

The following atoms will now not be quoted that would have been
incorrectly quoted:

- `:-`
- `:declawed?`
- `:neutered!`

The following atoms will be quoted that were incorrectly unquoted:

- `:"123Number"`

* Improve regex (again), remove files not generated

- The previous commit resulted in a number of warnings that were still
  present and so I played with the regular expression. This did not
  solve the problem, but the resulting regular expression is *much*
  better than the previous one, so I'm keeping it.

- The problem was that the configuration (`bin/configs/elixir.yaml`) is
  generated using a 3.0 input spec:

  ```yaml
  inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
  ```

  Which means that there were 16 files committed which were no longer
  being generated. When I tested with the 2.0 input spec:

  ```yaml
  inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
  ```

  The files were generated again. I *believe* that the correct change
  here is to switch back to the 2.0 input spec, as it tests more code
  generation, but I wanted to check in before I did this.

  The following files are deleted:

  - `elixir/lib/openapi_petstore/model/additional_properties_any_type.ex`
  - `elixir/lib/openapi_petstore/model/additional_properties_array.ex`
  - `elixir/lib/openapi_petstore/model/additional_properties_boolean.ex`
  - `elixir/lib/openapi_petstore/model/additional_properties_integer.ex`
  - `elixir/lib/openapi_petstore/model/additional_properties_number.ex`
  - `elixir/lib/openapi_petstore/model/additional_properties_object.ex`
  - `elixir/lib/openapi_petstore/model/additional_properties_string.ex`
  - `elixir/lib/openapi_petstore/model/big_cat.ex`
  - `elixir/lib/openapi_petstore/model/big_cat_all_of.ex`
  - `elixir/lib/openapi_petstore/model/inline_response_default.ex`
  - `elixir/lib/openapi_petstore/model/special_model_name.ex`
  - `elixir/lib/openapi_petstore/model/type_holder_default.ex`
  - `elixir/lib/openapi_petstore/model/type_holder_example.ex`
  - `elixir/lib/openapi_petstore/model/xml_item.ex`
  - `elixir/pom.xml`
  - `elixir/test/pet_test.exs`

  In the interim, I have removed those files from the commit.
2022-07-03 17:31:34 +08:00
William Cheng
f1dd44d70c
add tests for item with special characters (#12757) 2022-07-03 17:26:12 +08:00
Lazar Prijović
5658397152
[BUG] [CPP-UE4] Fix unique items list codegen (#12745)
* Fix unique items list codegen for UE4

* Update generator's doc
2022-07-03 17:17:48 +08:00
Lazar Prijović
b372f6424c
Fix codegen for nested container types (#12747) 2022-07-02 16:21:20 +08:00
Justin Black
6158274f65
Adds openapi v3.0.3 unit test spec, includes test cases, autogenerates model tests with them (#12619)
* Adds draft6 tests and python file reader

* Adds processing of multiple files

* Moves test examples into a different component so component schemas can be booleans

* Excludes boolean schema cases and some others that contain patternProperties

* Adds automatic test generation, template not quite working with indentation

* Turns on allOf tests, some failing

* Adds more generated components and tests

* Adds enum tests

* Turns on all of themissing tests

* Adds exclmax and min exclusion reasons

* Adds items test cases

* Adds maximum

* Adds maxItems

* Adds maxLength

* Adds maxProperties

* Adds minimum

* Adds minItems

* Adds minLength

* Adds minProperties

* Adds multipleOf

* Adds not

* Adds oneOf

* Adds pattern

* Adds patternProperties

* Working on properties examples, partial fix for escaped characters

* Further improves example string escaping

* Fixes properties test cases

* Adds draft6 test samples license

* Adds ref

* Finishes ref

* Adds remoteRef

* Adds required

* Improves required testing

* Fixes build error / javadoc warning

* Fixes uniqueItems bug in python-experimental

* Turns all tests back on

* Fixes 2 failing tests, all python tests pass

* Fixes java npe errors

* Fixes formatting of tests, indentation fixed

* Test fase name fixed to toTestCaseName, docstring added to ObjectWithTypeBooleans

* Fixes typo

* Adds test deletion to samples generation, samples regenerated

* Updates python-exp unit test sample, includes new ref examples
2022-07-01 13:46:02 -07:00
William Cheng
4cf58f5886
support enum integers in powershell client (#12752) 2022-07-01 13:52:47 +08:00
William Cheng
d0a0b822d6
[csharp-netcore] Add support for ComVisible, CLSCompliant attributes (#12733)
* add support for ComVisible, CLSCompliant attributes in csharp-netcore clients

* fix import
2022-07-01 13:51:29 +08:00
Anakael
280de38de9
[csharp-netcore] fix: url escaping (#12739)
* fix: url escaping

* doc: add Polly to dependencies

* Revert "doc: add Polly to dependencies"

This reverts commit 29b95ed2c42455e970ac806149c7602980be8f2f.
2022-06-30 23:10:17 +08:00
William Cheng
c982421495
[Go] use EqualFold instead instead of comparing strings in lower case (#12741)
* use EqualFold instead in the go client

* update samples
2022-06-30 23:09:10 +08:00
William Cheng
08108cc4ba
add tests for nested oneOf fromJSONString (#12740) 2022-06-30 23:08:49 +08:00
Bogdan Ilchyshyn
3a2bbbb850
support error handling in middleware (#12716) 2022-06-29 07:59:51 +02:00
William Cheng
0232d1cd00
add toString method to oneOf/anyOf objects (#12727) 2022-06-29 11:01:56 +08:00
William Cheng
3feb11acbb
fix nested oneof, fix toStringJSON (#12723) 2022-06-28 23:43:56 +08:00
anttikarhu
05ae49698f
Idea plugin for marking source directories, and omitting gradle wrapper (#12711)
* Idea plugin for marking source directories, and omitting gradle wrapper for creating sub projects

* Register the omitGradleWrapper option

* Added missing idea option
2022-06-28 16:06:10 +01:00
William Cheng
5cb66a8ab0
[R] Fix empty variable name, fix post process model (#12708)
* fix empty variable name, fix post process model

* fix empty base name
2022-06-27 19:26:51 +08:00
William Cheng
9522f6d1e2
add toString method in models (#12706) 2022-06-27 19:26:35 +08:00
William Cheng
229b2dcfac
add adyen logo (#12704) 2022-06-27 12:39:40 +08:00
Beppe Catanese
78380c239d
Add Adyen (#12702) 2022-06-27 12:32:15 +08:00
Bogdan Ilchyshyn
55d9231ca9
using import type instead of import for types imports (#12534) 2022-06-26 09:24:13 +02:00
William Cheng
726765af50
improve r documentation, readme, code sample (#12700) 2022-06-26 15:15:22 +08:00
Daniel Metzner
3b15bb8a4e
[PHP] Enhance Symfony generator (#12532)
* Enhance Symfony generator

  - Add missing typehints
  - Add missing use statements
  - Simplify model ctor
  - Change fallthrough Exception to Throwable
  - prevent storing result of void methods
  - fix validate method
  - add default null values to model properties
  - simplify API interface return values
  - fix/rework default value implementation
  - fix optional params deprecation warnings
  - ..

For more details check out the PR: https://github.com/OpenAPITools/openapi-generator/pull/12532

* Enhance Symfony generator Tests

  - Skip risky tests
  - Fix type hint error
  - Fix class exists tests
  - Fix broken doc block
  - Enhance annotations
  - Update phpunit.xml.dist
  - Fix test config resource location
2022-06-25 20:53:21 +08:00
William Cheng
286a31c019
Update jackson databind to 2.12.6.1 (#12698)
* update jackson databind to newer version

* update version

* fix retrofit2

* fix rest assured jackson samples
2022-06-25 20:30:41 +08:00
William Cheng
e4b78dbbd8
[R] minify json in toJSON (#12699)
* minify json in toJSON

* update fromjson with better variable naming
2022-06-25 18:11:25 +08:00
William Cheng
29ea48ee96
update jackson-databind-nullable to 0.2.3 (#12693) 2022-06-25 12:45:17 +08:00
William Cheng
f1a93fa3db add new test files 2022-06-25 12:05:28 +08:00
Jochen Reinhardt
88ae36eec0
#12656 fix HTML-escaped token and authorization URLs in Java based libraries (#12677) 2022-06-25 10:21:14 +08:00
jld3103
2c9bd4a28f
Put null values into serialized output in dart2 generator (#12569)
* Put null values into serialized output in dart2 generator

* Update samples
2022-06-25 10:07:00 +08:00
William Cheng
52452750c0 add test for anytype in cpp qt client 2022-06-25 10:05:01 +08:00
Daniel Renninghoff
c1b8780fff
[cpp-qt-client] Replace AnyType with QJsonValue (#12642) 2022-06-25 09:40:28 +08:00
William Cheng
22ea4a60a1
update readme to refer to 13.0.1 newtonsoft json (#12689) 2022-06-24 22:20:39 +08:00
William Cheng
91bc8b41c4
update resteasy lib to newer version (#12688) 2022-06-24 22:20:20 +08:00
William Cheng
f5e701c459
update r api doc (#12679) 2022-06-24 10:39:48 +08:00
William Cheng
c3970d7348
update r model doc (#12676) 2022-06-23 20:47:12 +08:00
William Cheng
7d768f2535
[R] add error object type support (#12402)
* use rlang as exception in the petstore test

* add errorObject support

* fix method name, use ModelApiRespeonse

* update samples

* update doc

* fix api exception
2022-06-23 13:45:05 +08:00