131 Commits

Author SHA1 Message Date
William Cheng
c50a775e0c
prepare 6.5.0 release (#14749) 2023-02-19 20:36:23 +08:00
William Cheng
93df0ff444
Prepare 6.4.0 release (#14748)
* prepare 6.4.0 release

* update samples
2023-02-19 18:53:20 +08:00
Beppe Catanese
68b944e6e6
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort

* Update integration testing expectations

* Regenerate files
2023-02-10 22:20:19 +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
William Cheng
8f2676c5c2
Prepare v6.3.0 release (#14580)
* 6.3.0 release

* fix maven plugin test

* update samples

* update doc

* fix tests in windows
2023-02-01 20:52:29 +08:00
0xNF
341a8535c7
[Dart] Fix array of array nullable and non-nullable value generation (#13461)
* [Dart] Added non-invalid defaults for non nullable array of arrays (#13460)

* [Dart] Update samples
2022-12-28 00:01:08 +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
William Cheng
4d03c9272b prepare 6.3.0 snapshot 2022-10-15 15:40:47 +08:00
William Cheng
ac7ebf67dd
Prepare 6.2.1 (#13517)
* update to 6.2.1-SNAPSHOT

* update samples

* update doc
2022-09-25 00:10:30 +08:00
William Cheng
24f476a381
prepare 6.2.0 release (#13514)
* set release version to 6.2.0

* update samples

* comment out rust server test in travis
2022-09-24 21:44:42 +08:00
0xNF
d75b7b6194
[Dart] Remove toString() call in enum TypeTransformers (#13452)
* Updated samples

* [Dart] Removed 'toString' check on enum TypeTransformers (#12167)
2022-09-20 13:22:31 +08:00
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
Noor Dawod
9d9e0a4335
Make "applyToParams" a Future + add "this." when decoding JSON (#13120)
* Bump jimschubert/query-tag-action from 1 to 2

Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases)
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2)

Signed-off-by: dependabot[bot] <support@github.com>

* Use a normal variable name inside a function, no need to make it private.

* Pass on authentication names because authentication implementations may need those!

* Generate Petstore samples.

* Allow authentication implementations to apply header and query parameters asynchronously.

* Allow inherited implementations to define a type for authentication class.

* Generate Petstore sources.

* Remove `authNames` from API client and authentication classes.

* Reference properties with `this.` in case one of them has the same name as a local variable.

* Regenerate Petstore source code.

* Revert adding a generic T in `ApiClient`.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-16 00:53:59 +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
2022-07-03 23:36:46 +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
Antonio Sagliocco
5b44aaf8d7
[Dart][Client] Support parsing DateTime (#12433)
* Support DateTime parsing

I've got issue in parsing an Array of Strings in datetime format, which the generator translates into a List<DateTime>.

This just fixes it

* update dart sampels

Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-06-04 21:59:46 +08:00
William Cheng
5bd94b8fa0 prepare 6.1.x 2022-05-26 12:58:25 +08:00
William Cheng
36a9cf394d
update samples (#12466) 2022-05-26 12:13:59 +08:00
William Cheng
69f79fb789
Prepare 6.0.0 release (#12463)
* prepare 6.0.0 release

* update samples

* update meta codegen
2022-05-26 10:28:01 +08:00
0xNF
96dd6c5806
[Dart] Fix incorrect generation of additionalProperties:true (#12165) (#12426)
* Update samples

Co-authored-by: 0xNF <0xNF>
2022-05-25 11:58:45 +08:00
William Cheng
12cdacabbf
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes

* update samples

* add new files

* better code format

* remove unused ruby files

* fix java test

* remove unused js spec files

* remove inline_response_default_test.dart

* fix webclient tests

* fix spring tests
2022-05-13 10:17:59 +08:00
Michael Marner
e6be5543dd
[Dart-Dio-Next]#9082 Add json_serializable serialization option (#9980)
* PoC json_serializable in dart-dio-next

* Move build.yaml template into json_serializable dir

* Undo implicit-dynamic change

* Fix automatic formatting

* Treat non-required fields as nullable

* Make class properties final

* Fix error introduced by merging in master

* Fix map creation when deserializing

* Exclude built files from analysis

* Add new dio import props

* Fix broken merge

* Fix configuration of nullable properties

* Only add api_util import if using built value

* Add config param to set properties as final

* Fix syntax error due to merge

* Update to simplified dio configuration

* Add missing api constructor template

* Fix import for multipart files

* Fix inclusion of library deserialize template

* Update docs

* Remove trailing newline from class

* Fix whitespace in generated templates

* FIx built value generation problem caused by merge conflicts

* Escape dollar signs in strings

* Handle enums

* Config for json_serializable sample

* Generate sample for json_serializable

* Revert "Escape dollar signs in strings"

This reverts commit 6e2a3aeea0450518433f2a07fe7cda92272b18a5.

* Use raw strings when dealing with enum values

* Add json_serializable Maven module ind fix number based enums

* regenerate all tests

* Update docs and fix wrong maven module

* add a beta hint to json_serializable option

* Update minimum dart sdk with json serializable

* Use dart 2.14 when testing Dart samples

* Update codegen to remove analysis errors in output

Co-authored-by: Peter Leibiger <kuhnroyal@gmail.com>
2022-04-27 16:12:22 +08:00
jld3103
37905e8bfa
dart2: Fix authentication (#11360)
* dart2: Fix authentication

* dart2: Update samples
2022-04-27 02:13:19 +08:00
William Cheng
8e49875871 update samples, docs 2022-04-24 15:38:16 +08:00
adessoDpd
1602942292
[Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation

* add option to use specified operationId

* update samples

* update cli description
2022-04-24 15:29:09 +08:00
William Cheng
8330e16d66
Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item

* update tests

* update samples

* regenerate samples

* fix allof naming, remove files

* add files

* update samples

* update readme

* fix tests

* update samples

* update samples

* add new files

* update test spec

* add back tests

* remove unused files

* comment out python test

* update js test using own spec

* remove files

* remove unused files

* remove files

* remove unused files

* better handling of allOf with a single type

* comment out go test

* remove test_all_of_with_single_ref_single_ref_type.py

* fix inline resolver, uncomment go test
2022-04-20 10:28:15 +08:00
0xNF
01ad80f5f8
[Dart][client] Adjust toJson method to use '_json' instead of 'json' to avoid shadowing fields named 'json' (#12127) (#12138)
* [Dart][client] Updated dart samples

Co-authored-by: 0xnf <0xnf>
2022-04-16 16:40:30 +08:00
Peter Leibiger
478ed9b8ed
Add a sample of an enum model array in query params (#12107) 2022-04-12 13:53:51 +08:00
Peter Leibiger
15e9d4ed8c
Add example allOf with single ref (#10948)
* Add example allOf with single ref

* fix dart-dio-next handling of that case

* Refactor without vendor extension

* Regenerate newer samples
2022-04-12 13:52:53 +08:00
William Cheng
2d4a01aa70 Revert "Prepare 6.0.0 beta release (#12039)"
This reverts commit 914b539eea7097ad2b4323d20c8f95144782cb68.
2022-04-04 12:17:12 +08:00
William Cheng
914b539eea
Prepare 6.0.0 beta release (#12039)
* update to 6.0.0-beta

* update samples
2022-04-04 10:29:49 +08:00
William Cheng
df05e6f4bc
Update parser to 2.0.29 (#11388)
* update parser to 2.0.29

* better handling of null in dereferencing

* update parser to 2.0.30

* update core to newer version

* add new files

* rollback to previous stable version

* remove files

* Fixes for python-experimental NullableShape component

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2022-02-21 18:37:52 +08:00
agilob
6c3cdee6fb
Dart - update generator to support null safety (#10637)
* fix: Make dart2 generated code compilable

* Update dart2 client samples

* Re-add deleted test files

* Lower dart version to 2.12

* Make username and pass not null in http basic auth

* Delete json_serializable

* Make growable false by default

* Make value not nullable

* Remove redundant null check

* Revert linter fix

* Provide required username and pass

* Revert initial abstractDartCodeGen changes

* Revert removing dart pom module

* Revert removing dart pom module

* Lower minimum dart version to 2.12

* Disable dart2 tests generation

* Disable petstore_client_lib

* Disable samples/openapi3/client/petstore/dart2/petstore

* Re-add dart2 tests

* Add new tests

* Delete empty directory

* api_client.mustacheUpdate 

added optional HttpBearerAuth so you can add the token directly on the ApiClient

* Update api_client.dart

auto generated files for build

* Update api_client.dart

Autogenerated files for buiild

* Make mapDateTime nullable and add ! after json mapping

* Fix warning on Future<?>

* Fix warning on Future<?>

* Dont insert unused param to constructor

* Modified Dart2 Mustache template.

* Regenerated Petstore source code.

* Remove extra code to sync with agilob's pr.

* Regenerated Petstore source code.

* Fix a couple of reported bugs.

* Regenerated Petstore source code.

* Make properties non-nullable.

* Regenerated Petstore source code.

* Do not trim user input before submitting.

* Regenerate Petstore source code.

* Regenerate Petstore source code.

Co-authored-by: Kate Döen <kate@stack11.io>
Co-authored-by: Artur Powroznik <arturp@backbase.com>
Co-authored-by: devjakobsen <94956607+devjakobsen@users.noreply.github.com>
Co-authored-by: Noor Dawod <noor@fine47.com>
2022-01-02 21:13:02 +08:00
WILLIAM CHENG
4f2b5ee36d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-11-01 00:54:44 +08:00
WILLIAM CHENG
ab603a7322 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-11-01 00:49:06 +08:00
Peter Leibiger
f1ab3edbc0
[dart] Fix pub server URL (#10695)
* replace private pub server with official pub server URL
2021-10-27 00:33:58 +08:00
WILLIAM CHENG
42f4e863b7 prepare 5.4.0-SNAPSHOT 2021-10-25 12:13:33 +08:00
William Cheng
378465702c
Prepare v5.3.1 in the master (#10681)
* prepare v5.3.1

* update doc

* update readme
2021-10-25 01:16:07 +08:00
William Cheng
730636ad31 Merge remote-tracking branch 'origin' into 6.0.x 2021-10-19 12:55:59 +08:00
agilob
77b72bd0ee
Dart json_serializable: remove experimental generator (#10532) 2021-10-12 16:07:23 +08:00
William Cheng
0bfa28f844 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-06 12:00:02 +08:00
Justin Black
d4b8ff60a1
[Java] Fixes schema class type booleans for composed schemas (#10334)
* Adds get/setIsString interface to IJsonSchemaValidationProperties

* Adds get/set isNumber interface in IJsonSchemaValidationProperties

* Adds get/set isAnyType in IJsonSchemaValidationProperties

* Adds and uses ModelUtils.isAnyType, adds setTypeProperties

* Adds missing descriptions of isAnyType parameters

* Uses ModelUtils.isAnyType

* Samples regenerated

* Moves isArray handling higher up in fromProperty

* Moves isAnyTypeSchema handling higher up in fromProperty

* Moves isFreeFormObject handling higher up in fromProperty

* Refactors fromProperties, updates tests

* Fixes the fromProperty refactor, tests now pass

* Uses setTypeProperties to set isNumber, isNull, isArray, and isUnboundedInteger

* Sets isAnyType in setTypeProperties

* Sets isMap in setTypeProperties

* Sets property.isPrimitiveType in isFreeFormObject, tweaks if condition order

* Adds fix for JavaClientCodegenTest.testJdkHttpClientWithAndWithoutDiscriminator

* Refactors fromProperty

* Adds updatePropertyForObject updatePropertyForAnyType

* Sets binary and file types to not be strings

* Updates samples

* Adds updatePropertyForString

* Adds testComposedPropertyTypes

* Fixes python test

* Samples updated

* Switches all isAnyTypeSchema usages to ModelUtils.isAnyType

* Refactors model enum handling higher up

* Moves m.dataType assignent higher into fromModel

* Moves m.isNullable setting higher into isModel

* Adds updateModelForComposedSchema

* Further fromModel refactoring, all schema checks are now at the same indentation level

* Further refactors fromModel, adds isTypeObjectSchema block

* Moves addVars into anyType or objectType blocks in fromModel

* Turns off isNullable n isAnyType array

* Fixes typescript CodegenParameers

* Adds updatePropertyForAnyType to typescript-axios so property.isNullable will be false for AnyType

* Adds testComposedModelTypes

* Updates ComposedAnyType schema

* Fixes tests for JavaJAXRSCXF by adding updateModelForObject method

* Updates go and csharp to handle object model differently

* Adds updateModelForAnyType

* Fixes name reference

* Adds testComposedResponseTypes

* Refactoring fromResponse

* Further refactoring of fromResponse

* Uses setTypeProperties in fromResponse

* Tests now pass for testComposedResponseTypes

* Sets COdegenResponse dataType using getTypeDeclaration

* Begins refactoring of fromRequestBody

* Adds updateResponseBodyForPrimitiveType

* Adds all needed type if else blocks in fromRequestBody

* Fixes JavaJAXRSCXFExtServerCodegenTests

* Fixes RubyClientCodegenTests

* Adds fixes for clients that need custom isMap for body parameters

* Ruby broken, samples regened, debugging

* Adds updateRequestBodyForArray, renames updateRequest.. methods

* Samples regenerated

* Removes changes from Ruby generator

* Reverts RubyClientCodegen.java

* Reverts changes to GoClientCodegen.java

* Reverts PowerShellClientCodegen.java

* Reverts CrystalClientCodegen.java

* Removes updateRequestBodyForObject from JavaCXFServerCodegen.java

* Adds comment about refed models

* Tweaks made to fromProperties to add an explanatory comment

* Updates RustServer to have ByteArray request bodies not be strings

* Sets types in fromFormProperty

* Adds testComposedRequestBodyTypes

* Fixes when validation syncing is done in syncValidationProperties

* Removes redundant validation code from fromParameter

* Moves parameter inX setting higher up before schema logic in fromParameter

* More refactoring in fromParameter, uses early return to reduce levels of indentation

* Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForArray

* Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForObject

* Removes setParameterBooleanFlagWithCodegenProperty from  updateRequestBodyForPrimitiveType

* Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForMap

* Removes setParameterBooleanFlagWithCodegenProperty from addBodyModelSchema

* Removes setParameterBooleanFlagWithCodegenProperty from fromFormProperty

* Refactors parameter array handling code into fromFormProperty

* Simplifies fromRequestBodyToFormParameters

* Removes setParameterBooleanFlagWithCodegenProperty from fromParameter

* Adds deprecated docstring to setParameterBooleanFlagWithCodegenProperty

* Refactors ModelUtils.isFileSchema out of string schema check

* Removes ModelUtils.isFileSchema from RustServer updateRequestBodyForString

* Improves comment text

* Fixes RustServer uuid type setting for CodegenParameter

* Removes unneeded parens

* Fixes array property examples

* Removes unused code

* Renames variable to itemsProperty

* Adds testComposedRequestQueryParamTypes

* Adds updatePropertyForAnyType to rustserver will not have changed model properties

* Hoists arrayInnerProperty._enum into parameter for html2 generator

* Moves turning string type off into the codegen files

* Adds two more missing locations in rustserver

* Moves addVarsRequiredVarsAdditionalProps into anytype and objecttype handling

* More refactoring of where addVarsRequiredVarsAdditionalProps is used

* Samples regenerated
2021-09-27 16:12:40 -07:00
William Cheng
acd747ca6d Merge remote-tracking branch 'origin/master' into 6.0.x 2021-09-22 12:13:44 +08:00
William Cheng
1947f130c0 update doc, samples 2021-09-21 11:52:33 +08:00
adessoDpd
1a48c5f19f
[Wsdl] Handle schema property of type array with oneOf items and other minor updates/fixes (#10434)
* add handling of array of oneOfs

* handle res model-type lowercase name +shorten code

* remove unnecessary vendor-extension model enum

* handle openapi lowercase schema name for array res

* change xs:anytype to string for file responses

* update checkstyles

* remove not needed imports again

* update samples

* upper/lowercase use local getdefault

* update  samples again
2021-09-21 11:46:05 +08:00
Noor Dawod
495f6eb30c
Dart2 template linting (#10263)
* Bump jimschubert/query-tag-action from 1 to 2

Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases)
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2)

Signed-off-by: dependabot[bot] <support@github.com>

* Updated Dart2 template to fix linting errors when using recommended rules.

* Updated Petstore code.

* Revert to having no EOF marker at end of few files.

* Fix a call on null value.

* Updated Petstore code.

* Add more checks for nulls.

* Updated Petstore code.

* Updated Petstore code.

* Revert back decoding an enum value.

* Revert back decoding an enum value.

* Updated Petstore code.

* Revert to older version of _convertParametersForCollectionFormat method.

* Updated Petstore code.

* Updated template and Petstore files.

* Adjust doc for analysis_options file.

* Updated Petstore sources.

* Shorten command to replace path parameters.

* Updated Petstore code.

* Add a space for readability.

* Adjust template per feedback.

* Remove unneeded break statements.

* Updated Petstore code.

* Keep a new line character when replacing parameter names (like before).

* Remove string interpolation.

* Updated Petstore code.

* Remove commented code.

* Regenerate Petstore code.

* Regenerated Petstore code.

* Use another parameter name to stop variable shadowing.

* Regenerated Petstore code.

* Put description adjacent to the class.

* Add another global ignore for all files: constant_identifier_names

* Use const for contentTypes and authNames.

* Regenerate Petstore code.

* Use shorter code to check for an empty array.

* Regenerate Petstore code.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 09:40:15 +08:00
William Cheng
477e2365c7
improve git_push.sh (#10356) 2021-09-09 12:49:03 +08:00
Peter Leibiger
a558554961
Add OAS3 allowEmptyValue for query params (#10312)
* add the special case of empty query parameters to the fake API
2021-09-03 16:32:51 +08:00