* Mustache template should use invokerPackage tag to generate import
* upgrade to http signature library version 1.4
* Use updated HTTP signature library
* Run sample scripts
* Add code samples in README file for HTTP signature
* fix java imports
* Update http-signature version
-D option has been deprecated as it was previously used to:
* Pass "system properties"
* Pass additional properties
This was confusing because we already have --additional-properties and
because Java System Properties are passed as -D before program
arguments.
Confusion around the -D option had existed for some time, but when we
introduced the thread-safe GlobalSettings to avoid overwriting Java
System Properties, we created a hard break from Java System Properties
in the generator. This also disconnected the previous "system
properties" from accepting additional properties.
Once these newly deprecated methods are removed, we will have a clear
separation of concerns between:
* Java System Properties
* Global generator properties (used as workflow context)
* Additional properties (used as generator options)
This commit marks multiple places for cleanup in 5.0. These will be
breaking changes, and lower effort to break in 5.0 with deprecation
warnings now rather than adding sibling properties throughout the code
and potentially introducing logic errors.
* type aliasing issue
* Add example OpenAPI document from issue 3589
https://github.com/OpenAPITools/openapi-generator/issues/3589
* Add test to reproduce the issue
- type of TypeAlias changed from 'string' to 'object'
(not sure if importMapping is supposed also for 'string' types...)
- there might be better ways to write the test, it's kind of a brute
force test (generate a file and parse it with a regexp)
* Remove duplicate test file
* Add new method override handleMethodResponse
Fixes broken unit test after merge from master
Co-authored-by: bkoziak <bkoziak@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
The maven documentation was missing a few option, a couple of option
properties, and was inconsistent regarding selective generation for apis
an models. This adds properties and options where appropriate and
updates the docs. All options in the README have been reordered to match
property declaration order in CodegenMojo, hopefully making it easier
for maintainers to recognized when there are docs missing or out of
date.
This also slightly refactors the code in CodegenMojo to reduce the
cyclomatic complexity of the `execute` method.
* 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
* Spotbugs, PMD and Checkstyle #33
* Reducing Spotbugs effort to min #33
* Also using project.parent.basedir and avoiding relative paths in pom files.
* Filtering out samples.
* Move PMD/Spotbugs to static-analysis profile
This moves the static-analysis checks to a standalone profile. Core
contributors may run static analysis with:
```
mvn -Pstatic-analysis install
```
The analysis is separated from default functionality to reduce impact to
community contributions. SpotBugs/PMD may add a non-trivial amount of
time to builds on some machines.
Co-authored-by: Tomas Bjerre <tomas.bjerre85@gmail.com>
* 🐛 Fixing some issues with threading and NPE
After running Sonar on the master branch, some major analysis
opportunities were displayed.
This fixes the use of SimpleDateFormat stored as static fields.
SimpleDateFormat is not thread-safe, and may retain data across threads.
While there's no indicator that this has caused any issues (these are
mostly used for example code), we should follow these best practices.
This also fixes a handful of NPE and other minor issues such as
comparing Boolean.TRUE to strings and no wrapping some closeables in
try-with-resources.
* [cli] Unit test GenerateBatch custom deserialization helper
* Quiet batch mode in sonar.yml
* Suppress unnecessary warnings (ThreadLocals in static fields)
* fix: prevent classcast exception during execution of openapi-generator-maven-plugin.
* style: revert styling to openapi defaults
* test: unit test coverage for handling boolean config options
* fix: replace option value with boolean, if it is a string literal boolean
* style: use data type long
* test: add maven testfile kotlin.xml to travis build
* test: runnable maven test of the kotlin generator