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

Sync with upstream #3

Merged
merged 81 commits into from
Feb 6, 2020
Merged

Sync with upstream #3

merged 81 commits into from
Feb 6, 2020

Conversation

amakhrov
Copy link
Collaborator

@amakhrov amakhrov commented Feb 6, 2020

This includes the last fix that blocked us from migrating clientapp: OpenAPITools#5182

wing328 and others added 30 commits November 4, 2019 09:28
…ons (OpenAPITools#3365)

* Expanding CodableHelper with a more customisable dateFormatter and JSON en-/decoder.

* Ran ./bin/swift4-petstore.sh

* Ran ./bin/swift4-petstore-all.sh again after merge from master.

* Ran ./bin/swift4-petstore-all.sh again after building.

* Ran ./bin/swift4-petstore-all.sh again after rebase latest from upstream master.

* sync master, update samples

* Built and ran ./bin/swift4-petstore-all.sh

* Re-adding code which disappeared in rebase from master.

* Fixed test

* [swift] remove old classes
…PITools#4884)

* Fix for Issue OpenAPITools#2205

Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime.
Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue.

For more info please refer to: OpenAPITools#2205

* fix java feign parameter request name (OpenAPITools#4883)

* update sprign cloud feign sample

* [JAVA][SPRING][2195] added missing getter for enum value (OpenAPITools#2346)

* [2195] added missing getter for enum value

* updated samples

* re-generate spring samples

* Removed @JsonValue from toString and regenerated samples

* re-generate spring samples

Co-authored-by: Esteban Gehring <[email protected]>

* update samples

* [kotlin][client] make Request date converter toJson as default

* [kotlin][client] update windows scripts

* [kotlin][client] update docs

* [kotlin][client] update scripts

* [kotlin][client] update scripts

Co-authored-by: Filipe Manuel Couto Pinheiro <[email protected]>
Co-authored-by: William Cheng <[email protected]>
Co-authored-by: Lukáš Vasek <[email protected]>
Co-authored-by: Esteban Gehring <[email protected]>
* [C-libcurl] Add object.c to CMakeLists to compile

* [C-libcurl] Add object.h/object.c to CMakeLists of sample
…ools#5094)

* [python] Cleanup ThreadPool with atexit rather than __del__

This removes the `__del__` function from the generated Python client,
and replaces it with a `cleanup` function. When a ThreadPool is created,
the cleanup function is registered with the `atexit` module.

This fixes OpenAPITools#5093, where the API client could hang indefinitely at
garbage collection.

* Update petstore examples

* Test to ensure threadpool is cleaned up

* Docs now encourage using the context manager

* Regenerate docs

* Update samples
…oise (OpenAPITools#5118)

* [feature] Log "debounce" filter to remove spam.

* [log] slf4j-simple should be optional

This also sets the default log level to ERROR during CI builds for many
mvn invocations. This should reduce noise in the logs.

* [log] Rely only on mvn loglevel=error for now

* [cli] Clean up unused dependency

* [log] Change level to error/warn in more CI
* add Deprecated in kotlin dataClass

* add deprecated in CodegenProperty

* format (Column limit: 100)

* set property.deprecated

* add test

* run ./bin/kotlin-springboot-petstore-all.sh

* trim space
…nAPITools#5111)

* Add .NET Core 3.x / .NET Standard 2.1

* Fixed test project target framework

* Fixed missing sync property

* Update generator docs
…tache (OpenAPITools#5109)

Descriptions tend to get lengthy and can include multiple lines.
New lines are important to markdown formatting/syntax and can't just be ignored.

Resolves OpenAPITools#3704
* Fixed compiler null-check warning

* Rename vendor extensions as `x-csharp-value-type`
OpenAPITools#5129)

* Updates ap.mustache for python-experimental, adds test test_test_endpoint_enums_length_one

* Removes sortParamsByRequiredFlag from python-experimental

* Removes duplicate params from docstring
sebastien-rosset and others added 27 commits February 2, 2020 15:34
Adds a more prominent Slack block on the main doc site in response
to a few users not setting the Slack chat links on the Readme or in the
"Learn how" block.

Fixes a rendering issue in the "Try via NPM" block.

Adds a one-liner about the recently added `-Dcolor` option for
optionally colorizing output in the CLI.
…n fields are null (OpenAPITools#5197)

* OpenAPITools#5174 fix [BUG] [typescript-angular]: objects as query parameters break when fields are null

* OpenAPITools#5174 Shell scripts run

* OpenAPITools#5174 Code style fix

* OpenAPITools#5174 Regenerate typescript-angular samples

* OpenAPITools#5174 Regenerate typescript-angular samples a second time
…sanitized strings (OpenAPITools#5152)

* use of cache for camel case and sanitized strings

* use of cache for camel case, sanitized strings and underscored words
* improve python documentation and add import to __init__package.mustache

* improve python documentation and add import to __init__package.mustache

* add signing_info parameter conditionally

* add code comments and remove 'Content-Length' header from example

* Remove debug log statement

* set access_token to None by default

* set access_token to None by default

* fix unit tests for Python experimental

* fix trailing space
* fix map as query parameter, use RequestPart instead of RequestParam in
FormParams, add filename for parameters of type file

* fix brace

* fix tests

* run bin/windows bat files

* test if this solves linending problem part 1

* test if this solves linending problem part 2

* test if this solves linending problem part 3

* test if this solves linending problem part 4

* test if this solves linending problem part 5

* test if this solves linending problem part 6

* manually set back version in pom

* update spring samples

Co-authored-by: William Cheng <[email protected]>
…penAPITools#5206)

* Change unnecessary `dynamic` to `object`

* Optimize package reference

* Fixed JsonSubTypes reference

* Update sample project

* Remove redundant method calls

* Update sample project

* Update README template
* The "name" field has to be a string

* Avoid duplicate double quotes
* [Java-Feign-issue 5173] - update feign form dependency version

* [Java-Feign-issue 5173] - updated feign versions in sample project

* [Java-Feign-issue 5173] - fix OAuth in Feign10 sample

* [Java-Feign-issue 5173] - updated OAuth Feign template

* update feign samples

Co-authored-by: William Cheng <[email protected]>
* [kotlin] Fix compile of reserved word in client

A number of places in the client code need to be escaped for reserved
words.

That is, this should be:
(git log formatted): `as` rather than as
(markdown formatted): \`as\` rather than `as`

There are only a handful of places using `{{paramName}}` which HTML
encodes backticks, rather than `{{{paramName}}}` which outputs literal
values.

Added unit test to maintain the reserved word standard for Kotlin.

* don't use kotlin-codegen-escaped parameters in parameter-map

Co-authored-by: Andreas Müller <[email protected]>
…nAPITools#5220)

* [typescript-angular] Use security scheme name when looking up API keys.

* [typescript-angular] Updated samples.
…ools#5106)

* fix akka-scala-client template compilation warnings

add COOKIE location authorization key
regenerate template

* fix scala akka-http client model imports

* fix OpenAPITools#4004 custom package name in reference.conf

* fix scaka-akka codegen test
* [core] Normalizing vendor extension naming

According to [OAS 2.0][1] and [OAS 3.0][2] Specifications:

> Allows extensions to the OpenAPI Schema. The field name MUST begin with x-,
>  for example, x-internal-id. The value can be null, a primitive, an array or an object.
>  Can have any valid JSON format value.

This commit attempts to define a [clear identifier design format][3] of
maintaining lower-kebab casing and following the x- prefix defined by
OAI Specification.

Following a convention that matches that used by others (see [autorest][4]), we will remove
any confusion about naming strategies for template authors and
customizers. Following the lower-kebab convention will allow us to
convert from camelCase and missing prefixes to the desired format. For
example, these conversions are simple to make for template consistency:

* customValue => x-custom-value
* x-customValue => x-custom-value
* x-custom-value => x-custom-value

This convention also allows us to define a single standard for use
across all generators. This means no occurrence of x-operationId in one
generator and x-operation-id in another.

[1]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#patterned-objects
[2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specificationExtensions
[3]: https://tools.ietf.org/html/draft-wilde-registries-01#section-3.4
[4]: https://github.com/Azure/autorest/tree/master/docs/extensions

* Incorporate feedback to avoid race/blocking in OnceLogger

* Remove unnecessary additional log config

* Add tests,comments for OnceLogger

* Test caffeine cache with FakeTicker
* python use aware datetime object

* python use aware datetime object

* python use aware datetime object

* python use aware datetime object

* python use aware datetime object

* python use aware datetime object
…llParents with multiple inheritance (OpenAPITools#5182)

* Add real assertions in DefaultCodegenTest.java testAllOfXXX methods

* Add test to DefaultCodegenTest for an allOf composition with a single ref and no own props

* Ensure model.parent is also added to model.allParents when multipleInheritance is supported

* Cleanup: remove LOGGER.debug, renamed refedParentNames to refedWithoutDiscriminator
* Reduce redundancy in python docs

This is a followup to PR OpenAPITools#5094, which had a few unresolved comments at
merge time. This reduces the amount of redundant lines in the api
example doc templates, and ensures that referenced Configuration objects
are actually instantiated.

* Regenerate samples
@amakhrov amakhrov merged commit e1281ef into master Feb 6, 2020
@amakhrov amakhrov deleted the sync-with-upstream branch February 6, 2020 23:40
alexbolo pushed a commit that referenced this pull request Dec 3, 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.