* 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
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.
* 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
* 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
* [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.
* [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
* 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
* [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
* [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
* 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
* Updates ap.mustache for python-experimental, adds test test_test_endpoint_enums_length_one
* Removes sortParamsByRequiredFlag from python-experimental
* Removes duplicate params from docstring
* 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
* [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
* [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
* 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