Commit Graph

13482 Commits

Author SHA1 Message Date
Kazuyuki Miyake
5b9b8bda76
add freee to the user list (#5203) 2020-02-04 22:07:50 +08:00
Jonas Haag
e45a1d03c0
Fix typo in jar URL on installation page (#5200) 2020-02-03 13:42:11 -05:00
Sebastien Rosset
67e4cc8be1
[Python] Python HTTP signature update (#5154)
* 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
2020-02-03 09:39:17 -08:00
Sebastien Rosset
dcc914421e
[codegen] Performance optimizations: use of cache for camel case and sanitized strings (#5152)
* use of cache for camel case and sanitized strings

* use of cache for camel case, sanitized strings and underscored words
2020-02-03 22:56:42 +08:00
Daniel Frąk
149778a7e7
[typescript-angular]: objects as query parameters no longer break when fields are null (#5197)
* #5174 fix [BUG] [typescript-angular]: objects as query parameters break when fields are null

* #5174 Shell scripts run

* #5174 Code style fix

* #5174 Regenerate typescript-angular samples

* #5174 Regenerate typescript-angular samples a second time
2020-02-03 13:33:05 +01:00
Ben Cox
fbcb8e0c7e
[java-jersey2] Fix empty body when form parameters supplied (#5169) 2020-02-03 17:11:59 +08:00
William Cheng
b36b65964f update kotlin samples 2020-02-03 16:32:31 +08:00
Yutaka.Miyamae
a6807a73e5
[Kotlin]Formatted according to the kotlin style guide (#5196)
* Do not put a space
https://kotlinlang.org/docs/reference/coding-conventions.html#horizontal-whitespace

* Use 4 spaces for indentation
https://kotlinlang.org/docs/reference/coding-conventions.html#formatting

* Put spaces around the `=` sign
https://kotlinlang.org/docs/reference/coding-conventions.html#method-call-formatting

* Indent the expression body by 4 spaces
https://kotlinlang.org/docs/reference/coding-conventions.html#expression-body-formatting

* run ./bin/kotlin-springboot-petstore-all.sh
2020-02-03 16:17:26 +08:00
Jim Schubert
7d366ad6ac
[docs] Slack block, formatting, 'color' CLI option (#5194)
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.
2020-02-03 16:08:51 +08:00
Jim Schubert
97ff9b4be7
[cli] Optional colorized outputs (#5193) 2020-02-02 17:36:53 -05:00
Sebastien Rosset
9e32d43570
[bug] fix null pointer exception while evaluating recommend… (#5191) 2020-02-02 15:34:49 -05:00
Tatsuro Shibamura
f356de606b
[csharp-netcore] Improved Multimap and ClientUtils implementation (#5122)
* Improvement Multimap impl

* Fixed missing semi-colon

* Fixed compile error using .NET Standard 2.0

* Fixed compile error using .NET Standard 2.0

* Update sample projects

* Apply modifications to additional code flows
2020-02-03 00:15:33 +08:00
Matt Traynham
26c9c64634
[kotlin][client] Add inheritance to Kotlin Client templates (#4453)
* Add inheritance to Kotlin Client templates

* Correct white spacing issues

* Rebuild kotlin client samples
2020-02-01 22:12:11 -05:00
Jim Schubert
a496c2011f
[docs] Initial FeatureSet generator documentation (#5188)
* Flatten feature sets for display

* [cli] Add feature set output to config-help

This includes markdown and plain text outputs for config-help.

* [docs] FeatureSet on generator docs
2020-02-01 20:51:55 -05:00
Sebastien Rosset
8d8c106c3a
[Go] Support HTTP signature (#4959)
* add support for ECDSA keys

* Add support for HTTP signature

* use bytes.Buffer instead of strings.Builder

* Add unit tests, compliance with HTTP signature draft version 12

* Support (expires) parameter

* Validate list of signed headers does not have duplicate values

* move method to ProcessUtils

* Add http-signature security scheme

* add http_signature_test to security scheme

* remove http signature from petapi

* Add separate OAS file with support for HTTP signature

* Include HTTP signature in README file

* Add generated files for HTTP signature

* Add helper function to return public key, and add more unit tests for signature validation

* some people save their private key with file extensions other than .pem, so I am relaxing the validation of the private key suffix
2020-02-01 15:42:15 -05:00
William Cheng
cd67822d68
Add shibayan to C# technical committee (#5186) 2020-02-02 00:29:17 +08:00
Tatsuro Shibamura
8197a8a47b
Explicitly set netCoreProjectFile only for .NET Core target (#5151) 2020-02-02 00:26:27 +08:00
Tatsuro Shibamura
a8435d153e
[csharp-netcore] Remove unnecessary legacy project definitions (#5108)
* Remove unnecessary csproj definitions

* Removed deprecated files generation

* Fixed code generator compile error

* Update sample code

* Update sample projects

* Revert "Removed deprecated files generation"

This reverts commit c6841c2b54fac74d31a1cf59ea73d50c430609ba.

* Revert "Fixed code generator compile error"

This reverts commit cc0bd070e75d9fbc9620045105631fef8ca6fc1b.

* Regenerate missing project.json file
2020-02-02 00:08:09 +08:00
Tatsuro Shibamura
e86faa4ed1
[csharp][csharp-netcore][csharp-dotnet2] Convert bool value to string in lower case (#5178)
* Convert bool value to string in lower case

* Update sample projects
2020-02-01 23:54:53 +08:00
Sebastien Rosset
20e5c5d6e7
[Golang] Add support allOf inheritance with embedded go structs (#4934)
* Golang: generate embedded structs and set supportsInheritance to true

* Run bin/go-experimental-petstore.sh
2020-02-01 09:44:15 -05:00
Sebastien Rosset
6f1ce5645e
[codegen] Add code comments and improve "first content" warning (#5184)
* Add code comments and improve warning
2020-02-01 08:50:11 -05:00
Jim Schubert
c8cd255ad3
[gradle] Add recommendations to validate task (#5183)
* [gradle] Add recommendations to validate task

* Use current version of Gradle Plugin in build checks.

* Fix gradle project build version confusion in CI

* [gradle] Bump samples to 5.2.1 wrapper

Previously, the Gradle plugin was building in CI against
openapi-generator 4.2.0 and Gradle version 4.10.2. At some point, a
contribution was made with an API which is incomatible at 4.10.2 and due
to a release script error which pinned the local-spec version to release
4.2.0, we didn't notice this inconsistency.

This bumps the project to build against Gradle 5.2.1.
2020-02-01 04:03:34 -05:00
Jim Schubert
7cdbcec1a5
[doc] Update versions missed during release (#5185)
* [doc] Update versions missed during release

Removed old script bin/utils/release_version_update_docs.sh to avoid
confusion. New script solves issues of not "globally" replacing.

New script is at:

bin/utils/release/release_version_update_docs.sh

* Update Gradle Plugin README with correct version

* Update gradle.properties to correct version
2020-01-31 22:40:33 -05:00
Jim Schubert
507f80617d
[bug] Templates via classpath (#5164)
* Fixes issue with templates loading via classpath

The templating engines were originally written to load templates via the
classpath, but this functionality was blocked by file-only checks
further up the stack. This loosens those file-only checks, allowing
files and relatively imported files to be included via classpath.

* [docs] Add details about classpath-level templates

* [feat][maven] templateResourcePath for template on classpath
  - NOTE templateResourcePath is not needed for gradle, as it accepts
    a string for the target template directory, which supports classpath
2020-01-31 17:36:06 -05:00
Jim Schubert
22c6c0ca68
[core] Extracting recommendations to validation framework (#4979)
* [core] Extracting recommendations to validation framework

This is work to extract recommendation logic out of the CLI validate command
into a shared evaluation instance which can be used elsewhere (such as Gradle,
or the Online tool).

For now, these validations are in addition to those provided by swagger-parser and
are only the following recommendations:

* Apache/Nginx warning that header values with underscore are dropped by default
* Unused models/schemas
* Use of properties with oneOf, which is ambiguous in OpenAPI Specification

I've allowed for disabling recommendations via System properties, since this is
something that has been requested a few times by users. System properties in this
commit include:

* openapi.generator.rule.recommendations=false
  - Allows for disabling recommendations completely. This wouldn't include all warnings
    and errors, only those we deem to be suggestions
* openapi.generator.rule.apache-nginx-underscore=false
  - Allows for disabling the Apache/Nginx warning when header names have underscore
  - This is a legacy CGI configuration, and doesn't affect all web servers
* openapi.generator.rule.oneof-properties-ambiguity=false
  - We support this functionality, but the specification may not intend for it
  - This is more to reduce noise
* openapi.generator.rule.unused-schemas=false
  - We will warn when a schema is not referenced outside of Components, which
    users have requested to be able to turn off
* openapi.generator.rule.anti-patterns.uri-unexpected-body=false

* Move recommendation/validations to oas package and add javadoc comments

* Refactor and test recommendation validations

* Refactor validation function signatures to return explicit state rather than boolean

* Add operation recommendation for GET/HEAD w/body
2020-01-31 12:19:16 -05:00
Yutaka.Miyamae
f06ac9d91c
Add a link to a ytaka0m blog post (#5176) 2020-01-31 22:57:15 +09:00
Alexey Makhrov
e32a2f0121
[typescript] Append enum suffix without model suffix (#5138)
* [typescript] Generate enum name independently on model name, ignoring modelSuffix

* Add `enumSufix` cli option for all typescript generators

* Add ENUM_NAME_SUFFIX to to TypeScript***ClientOptionsProvider

* Add a typeMapping for OAS2 built-in "file" type

* Re-generate samples

* Introduce `v4-compat` mode for enumNamePrefix

* Update TypeScriptFetchModelTest - make sure codegen options are processed before running assertions

* Regenerate samples

* Regenerate docs

* Regenerate docs
2020-01-31 12:17:22 +01:00
William Cheng
92739a967a update samples 2020-01-31 19:16:03 +08:00
William Cheng
e90b1817b5 update readme 2020-01-31 19:01:44 +08:00
William Cheng
03a59046f4 Merge remote-tracking branch 'origin/4.3.x' 2020-01-31 19:00:28 +08:00
William Cheng
26ace1337d
Prepare 4.2.3 release (#5172)
* release 4.2.3

* update readme
2020-01-31 16:24:06 +08:00
Alexey Makhrov
f0d92bb0c1
[typescript] Introduce "enumPropertyNaming" option (#5162)
* Add enumPropertyNaming option to typescript generators

* Regenerate docs

* Add Locale.ROOT to toUpperCase() call

* Use actual enum values in an error message, instead of hardcoding them

* Add tests for "UPPERCASE" and "snake_case" enum var namings

* Add LOCALE.ROOT to String#format call
2020-01-31 07:56:18 +01:00
Jim Schubert
49a9b61f51
[gradle] Reorganize build repositories (#5168) 2020-01-30 20:18:39 -05:00
Jim Schubert
97c8009ccb
[gradle] Clarify defining multiple tasks (#5167) 2020-01-30 16:00:13 -05:00
Alexey Makhrov
845acce4af
Remove typeMapping for "List" from AbstractTypeScriptClientCodegen (#5160) 2020-01-30 08:47:08 +01:00
Justin Black
a51d02ac61
[Python] Fix #5126 operations with req enums of length one (#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
2020-01-29 10:10:41 -08:00
Tatsuro Shibamura
3922607858
[csharp-netcore] Fixed compiler null-check warning (#5119)
* Fixed compiler null-check warning

* Rename vendor extensions as `x-csharp-value-type`
2020-01-30 00:52:48 +08:00
Jim Schubert
76e8e81668
[core] Add back functionality to debug openapi spec, accidentally removed in 4.1.2 (#5147) 2020-01-29 08:30:20 -05:00
LoveIsGrief
6cf58afdc5
Switch to predominant use of appDescriptionWithNewLines in README.mustache (#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 https://github.com/OpenAPITools/openapi-generator/issues/3704
2020-01-29 17:18:57 +08:00
Hui Yu
f4185b8d9e
[C-libcurl] Support HTTPS/SSL for the C client (#5140) 2020-01-29 16:57:31 +08:00
Tatsuro Shibamura
e27700cfee
[csharp-netcore] Support .NET Core 3.0/3.1 and .NET Standard 2.1 (#5111)
* Add .NET Core 3.x / .NET Standard 2.1

* Fixed test project target framework

* Fixed missing sync property

* Update generator docs
2020-01-29 16:50:06 +08:00
Yutaka.Miyamae
8214460ec5
Add deprecated annotation in kotlin-spring (#5090)
* 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
2020-01-29 16:30:33 +08:00
Jim Schubert
1ac0f141a6
[feature] Default CI log level for slf4j-simple to error to prevent noise (#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
2020-01-29 16:28:42 +08:00
William Cheng
f37951a0ba
Add a link to dev.to article (#5142) 2020-01-29 16:20:50 +08:00
William Cheng
0f48ab8b15
Add bkabrda to Java technical committee (#5141) 2020-01-29 16:09:08 +08:00
Fabian von Feilitzsch
15345e1620
[python] Cleanup ThreadPool with atexit rather than __del__ (#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 #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
2020-01-28 21:58:11 -08:00
Jim Schubert
d627282e89
[go] Allow user overrides for generated outputs (#5132) 2020-01-28 20:29:10 -05:00
Hui Yu
f152a22094
[C-libcurl] Add object.c to CMakeLists to compile (#5130)
* [C-libcurl] Add object.c to CMakeLists to compile

* [C-libcurl] Add object.h/object.c to CMakeLists of sample
2020-01-29 01:34:51 +01:00
Alexey Makhrov
105ce99039 [typescript-angular] Import models from a single model/models.ts (#5128)
* Make api to models from a single model/models.ts instead of individual model files.
Fixes inconsistent usage of file names with inline models (inline-model-1, inline-model-2, ...)

* Remove additional mapped filename prop from api imports (since it's not reliable)

* Rerun ./bin/typescript-angular-petstore-all.sh

* Restore the `filename` property passed to the templates, with a comment it's no longer used
2020-01-28 08:23:18 +01:00
sunn
ab5f224634
Support abort operation (#5114) 2020-01-27 16:00:58 +01:00