Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge latest openapi #3

Merged
merged 55 commits into from
Dec 10, 2020
Merged

merge latest openapi #3

merged 55 commits into from
Dec 10, 2020

Conversation

bflamand
Copy link
Owner

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

wing328 and others added 30 commits December 1, 2020 15:24
* fix port missingin oas 3 spec

* update samples
…#8048)

* Implemented the psdata property for module manifest file (Tags, LicenseUri, ProjectUri, IconUri, ReleaseNotes)

* fix string.format

* update doc

Co-authored-by: William Cheng <[email protected]>
When generation examples of objects with additional properties, we use
the map syntax inside a model instantiation, which is incorrect. This
fixes it by checking for model at the right place.
* [dart-dio] Add basic integration test POM

This basically just fetches dependencies, runs the built_value generator and empty test cases. Even running empty test cases is more than is currently possible and at least finds compile errors.

There are compile errors atm which need to be fixed.

* [dart-dio] Fix missing BuiltSet import in models that use enums

* [dart-dio] Fix compile error when the return type is a Map

* the compile error was `serializerForType(Map<String, int>)` in `StoreApi` which needs to be  `serializerForType(Map)`
* use final instead of var in response handling

* [dart-dio] Generate docs after changes

* [dart-dio] Add integration test to CI execution list
* Default body to NULL

* update samples

* Update to set body to NULL only when no hasBodyParam

* Revert any whitespace changes.

* Makes defaulting body conditional on hasFormParams also not being set

Co-authored-by: William Cheng <[email protected]>
Co-authored-by: Robert Pyke <[email protected]>
Add a link to massive art blog
* fix oneOf derserializaoneOf deserialization with additonal prop

* fix tests due to better handlding of additional prop
* add script to detect changes in test files

* remove build failure test
* JS Client: Allow dot in path parameter name

* JS Client: Allow dot in path parameter name

* Delete ApiClient.js

* Delete ApiClient.js

Co-authored-by: Nikolai Konovalov <[email protected]>
…wagger-UI' (#8031) (#8032)

* [Spring] Add @ApiIgnore to parameter ServerWebExchange of reactive style (#8031)

* [Spring] Apply contribution guidelines (#8031)
…spring (#8046)

* [java][spring] updated template to support proper reactive map type

* [java][spring] supporting unit test for spring boot reactive request map issue

* [java][spring] updated samples

* [java][spring] refactoring the issue test spec
* Subclass Python exceptions (#7321)

* Subclass Python exceptions:
- UnauthorizedException (401)
- ForbiddenException (403)
- NotFoundException (404)
- ServiceException [500 - 599]

Fixes #2151

* add generated sample code

* use Python 2 flavor inheritance

* regenerate samples

* update samples

Co-authored-by: Ryan Rishi <[email protected]>
Co-authored-by: William Cheng <[email protected]>
* Updated Eiffel code generator.
	Added missing language reserved words.

Updated mustache templates to use the latest Eiffel rules to avoid obsolte
feature calls and Cat-Calls.
Updated Eiffel configuration files (ecf's)
Updated comments styles.
Updated Travis CI file to use the latest Eiffel compiler.
Updated EIffel sample to use https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Added missing mapping decimal to REAL_64
Added Eiffel Kernel classes to importMapping to avoid generate models for
them.
Fixed issue with Eiffel feature name generation, updated toOperationId(String) method.
Simplified toInstantiationType method implementaetion.
Improved model.mustache to generate Eiffel models.

* Updated Eiffel sample.

* Removed unneeded tabs.

* Added AnyType mapping to ANY
Removed unneeded tab
Updated model name, remane models that starts with _.

* update doc

Co-authored-by: William Cheng <[email protected]>
* Bump Gradle in Java projects from 6.0.1 to 6.7.1

Regular maintenance, 6.0.1 was released November 18th, 2019 and the latest release (November 16th, 2020) is 6.7.1. This updates all the wrapper templatesto the latest version.

* Updated generated Java samples

Generated via `./bin/generate-samples.sh bin/configs/java-*`

* update samples

Co-authored-by: William Cheng <[email protected]>
* feat(config): pull the basePath from config if the basePath doesn't exist

* chore: update samples

* chore: use the basePath from the base class

* chore: update all the samples
…n multiple file uploads (#8105)

* [typescript-axios] Sets 'isCollectionFormatMulti' to true on file uploads.

Fixes #8104

* Safely checks if dateFormat is "binary" #8105

Co-authored-by: Bruno Matissek <[email protected]>
* [dart] Cleanup and regnerate old/wrong tests and docs

* docs path seems to be doc now in all dart generators
* generated tests are very old and use wrong classes

* [dart-dio] Improve formatting

* [dart][dart-dio] Restructure tests to same layout

* remove duplicate/old openapi sample for which there is no generation config
* generate to `petstore_client_lib` for both generators
* run generated tests as integration tests for dart2 even if empty - this makes it easier to find compile errors

* [dart] Improve gitignore handling for Dart generators

* globally ignore all dart related files that should not be commited
* remove old ignores that are no longer valid

* [dart][dart-dio] Add OAS3 generation and integration tests

Dart2 doesn't compile, needs fixes.

* [dart] Do not attempt to deserialize binary content from JSON fields

Not sure if that case is ever relevant but for now there doesn't seem to be a better option.

* [dart] Fix integration tests for OAS3 petstore

Some POST operations now return 200 with content.

* [dart] Generate Petstore Fake API but don't add to integration tests yet

Explicitly not adding the new integration tests to the master POM. They do not work but having them allows for quickly iterating on open issues without breaking existing basic OAS2/OAS3 petstore examples. Instead they should be run manually until everything is fixed.
…ect in multipart/form-data (#8075)

* encode object in json and add content-type:application/json for multipart/form-data

fix issue #8068

* update samples by ./bin/generate-samples.sh

* non-ascii chars supported in encoding object to json, and add "content-type:application/json; charset=utf-8"

* update samples again, by ./bin/generate-samples.sh

* update comment(docstring) in parameters_to_multipart according to the discussion in PR review.

* fix default value in parameters_to_multipart function as described in PR review comment.

* update samples again, by ./bin/generate-samples.sh
* Remove redundant encoding definitions

UTF-8 is already the default encoding in Python 3.

* Remove Python3.4 related requirements

* Remove dead Python version 3.5

* Add Python 3.9 to CI and test configs

* Update petstore example
* Fixes issue 8014, _check_type flag not being honored.

Updated model_utils.mustache to pass the check_type flag into attempt_convert_item(). Failure to do so
results in type validation errors occurring when the user has specifically requested that they be disabled.

* regenerated samples

Co-authored-by: Frank Levine <[email protected]>
kuhnroyal and others added 25 commits December 8, 2020 12:00
* [dart] Configure and use import mapping

This prevents models from being generated which would clash with exisiting dart types, e.g. List.

* [dart] Fix decimal format not supported

* [dart-dio] Remove redundant modelToIgnore & ignore dart:core import

* modelToIgnore is now handled via importMappings the same way other generators do this
* choose not to import dart:core as this is available by default

* [dart-dio] EnumClass is a reserved word in built_value

* Review changes

* Fix regenerate docs
this fixes a bug where the parser would return
null when missing parameters rather than reporting
some useful error.

Fixes N/A
…ct reference withmodel properties (#8087)

* Updated all C# templates ToJson method not to conflict reference with model properties.

* update samples

Co-authored-by: William Cheng <[email protected]>
…enumerations (#7717)

* Allow to implement validation of input data for enumerations

* Regen petstore sample
* revise wordings for options

* update
#7411)

* [dart-dio] Fixes errors when primitive return types are attempted to be deserialized as json

* Updates samples

* Removes old files
* [dart-dio] Enum classes with int values now generate correct BuiltValueEnumConst annotation

* [dart-dio] Address PR comments
This should fix all problems related to unescaped characters in strings that are assumed to be raw - e.g. `json[r'$special[property.name]']`
…ibs.Files.TemporaryFile because it doesn't work at runtime. (#8130)
* [dart-dio] Fix wrong escaped serializer names

* [dart-dio] Prevent enum name collisions in inlined enums

Prefix the private built_value instances with the enum class name. Prevents clashes when multiple inline enums contain the same value - for example `EnumTest`.  No breaking changes here as all the changed fields/references are private and automatically re-generated with built_value.
* [dart] Properly escape param/var names that clash with Dart types

* [dart] Add tests for var/enumVar names

* note: public and private are no keywords in Dart
* some tests are still wrong, some are commented out

* Fix typo

* [dart] Improve variable name escaping

* add more tests

* [dart] Fix operationId naming

* [dart] Fix upper case var name with leading underscore

* [dart] Correctly support model prefix/suffix

* [dart] Support spaces in property names

* Call super for empty operationId

* [dart] Fix and improve enumVar naming/generation

* use same handling for all 3 generators
* allow `updateEnumVarsWithExtensions` to have access to the data type
* improve `x-enum-values` handling and add supprt for other enum vendor extensions
* remove duplicate and outdated tests from `DartDioModelTest`
* add more tests to `DartModelTest`
* no longer force lowercase enums for plain dart generator (breaking)
* this change also removes the trailing underscore from plain dart generator (breaking)
* fix IndexOutOfBoundsException with no model

* better code format
* update parser to 2.0.23

* upgrade to 2.0.24

* Revert "upgrade to 2.0.24"

This reverts commit d971477.
* Add dynamicOperations option to okhttp gen

* Add tests

* Add apiclient tests

* Fix apiclient template

* Add dependencies in gradle and sbt
…uest'… (#8103)

* Fix for 'Invalid code for files array in multipart/form-data request' (#8093)

* Executed ensure-up-to-date

* Replaced spaces with tabs.
@bflamand bflamand merged commit ea5a5eb into bflamand:master Dec 10, 2020
bflamand pushed a commit that referenced this pull request Apr 20, 2021
…3&4 (OpenAPITools#6916)

* Added supporting kotlin.serialization for jvm

* Added Serializable annotations for java types(date,time,url,uri etc.)

* Added SafeEnumSerializer

* Added StringBuilderAdapter for kotlin.serialization
Fix adapter naming
Fix Retrofit ApiClient.kt for kotlin.serialization

* Added StringBuilderAdapter for kotlin.serialization

* Switch sample to retrofit2-kotlin-serialization

* Add sample for retrofit2-kotlin.serialization

* update sample

* update sample

* update sample #3

* Fix enum quotes for kotlin.serialization

* update samples

* update pom.xml

* add pom.xml to child module

* fix kotlin-multiplatform freeCompilerArgs

* refactoring, add useSafeEnum option, remove safeEnum for kotlin.multiplatform

* update kotlin samples

* fix import kotlinx.serialization.Required

* Update kotlinx.serialization 1.0.0-rc-2, kotlin 1.4.10, retrofit-kotlinx-converter 0.7.0

* Update gradle wrapper 6.7-rc-3

* fix SafeEnum import

* fix Json initialization,
fix SafeEnumSerializer

* update samples

* update kotlinx.serialization to 1.0.0

* Update gradle to 6.7 in kotlin samples

* fixed adding @contextual for collections with non-primitive type elements

* remove unused SafeEnum imports, refactored

* update kotlin readme

* update kotlin project template Readme.md

* update samples for kotlin

* simplify template for class properties

* remove @contextual from kotlin-multiplatform

* update kotlin multiplatform dependencies

* refactoring templates

* revert all changes for multiplatform

* fix tests

* revert multiplatform #2

* update samples after merge, fix missed isListContainer->isArray

* fixed redundant space before @contextual

* Fixed enum template, Class were missed in generated samples

* fix enum template toString value->serialName

* fixed isEnum case for collections

* update samples

* removed useSafeEnum option, kotlinx serialization has out of box approach with coerceInputValues option for same behavior

* generate samples

* update kotlinx.serialization 1.0.1

* update samples

* Added pom.mustache template for kotlin-client samples with fixed execution of gradle wrapper instead standalone installed gradle on CI

* update samples with new pom.xml

* reverted enum value property name

* fixed kotlin-multiplatform pom.xml

* update kotlin-threetenbp sample

* update kotlin-string sample

* update kotlin-string sample

* fix adding kotlinx.serialization classpath to build.gradle

* generate samples

* add supporting kotlinx_serialization kotlinx.serialization.Serializable with java.io.Serializable at the same time

* update retrofit2-kotlinx-serialization-converter:0.8.0

* update kotlinx_serialization sample with retrofit2-kotlinx-serialization-converter:0.8.0

* apply suggest from @blendthink

* added proguard-rules.pro file for kotlinx.serialization on Android projects

* fix pom.mustache

* update gradle wrapper to 6.8.3

* update kotlin samples

* fix kotlin readme template, update kotlin samples

* update kotlin samples

* update kotlin sample
delete petstore/kotlin unit tests

* revert deletion kotlin client tests
remove adding pom.xml to kotlin client samples

* add support kotlinx serialization for okhttp3/4

* update kotlin client samples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.