This updates config-help to have more control over how the output is
written for the user. We dump config-help output for per-generator
documentation, and this cleans up some cross-platform compatibility
issues that might arise from tweaking the output for clarity in the
target file.
Previously, we'd pipe config-help output to sed, then insert the
generator name, which we then redirected to an output file. The sed
syntax had to include a trailing newline so our tabbed configs would
automatically become code tags in markdown. Inserting newlines into sed
replacement strings doesn't work the same across platforms, mostly
because of Apple's customizations to GNU programs.
This commit moves the generator name and newline insertion into the
command itself. It also includes a new --output option, allowing the
user to specify the output location of the config-help.
Currently, we only dump in plain-text, and it is only coincidental that
our plaintext output results in a desirable Markdown output. If
tabbed lines did not automatically convert to a code style block, some
generators like C# would end up with broken text (`List<T>` would become
just `List`, for example).
I had previously discussed extending config-help to output to other
formats like asciidoc. This commit does not introduce any steps toward
that end.
* update release version, disabled ensure up to date script
* update release table
* update stable version to 3.2.3
* update samples/meta-codegen/lib/pom.xml and release_version_update.sh
* Added forbiddenapis check and fixed the findings in the normal code
* Fixed forbiddenapi findings in java templates and samples.
* Generated all samples for Java.
It makes sense that error messages should be written to STDERR and
all others should be written to STDOUT (as shown in #207). However, it
would be convenient to parse the debugging output when the relevant
flags are set.
This change will disable logging to STDOUT and redirect all log messages
to STDERR when any of the debug flags are set. (Resolves#473)
* Validate spec on generation by default
Adds a validation parameter to CodegenConfigurator, and passes through
options from CLI, Maven Plugin and Gradle Plugin to that property.
Default is to validate the spec during generation. If spec has errors,
we will output errors as well as warnings to the user.
Option can be disabled by passing false to validateSpec (Maven/Gradle)
or --validate-spec (CLI).
* Prepare version 3.1.1-SNAPSHOT
* fix version
* Use last prod version for the sample
* Update README.md
Fix
* [cli] Option parser does not support true/false for boolean options
* add new bash script for release version update
* update version using the bash script
* Fix shippable build
Modify `artifactId` of `CI/pom.xml.shippable` to be `openapi-generator-shippable-pom`
* Comment ensure-up-to-date
* add shippable to the release script
* Updates README based on new release changes (#271)
The release management changes moved from maven-publish (newer plugin)
to maven (older plugin, only one that works currently with signing).
This updates docs in the samples/local-spec project with current
directions.
Also:
* Includes sonatype releases/snapshots on repo lookup
* Adds openApiGeneratorVersion property
* [cli] Completions command for suggestions
This takes airlift's 'suggest' command and reuses it as a different
command name, 'completion'. This gives us in-built CLI completions which
are useful in the repo-level container's docker-entrypoint.sh. This
previously parsed Java files for conventional usage of Command
annotations, which is potentially buggy. The new implementation relies
only on CLI to provide command completion suggestions.
As part of this, we can prepare for bash completion scripts which can be
added to our homebrew formula. The new completion command will also
complete on command options, for example:
cli completion generate
This will provide all short and long form switches available to the
generate command.
* Add piggyback license onto licensed of file borrowed from airlift/airline
* [cli] Write to stdout/stderr, allow redirection
Previously, slf4j-simple from generator core was being used. This writes
to only a single stream (STDERR) and is confusing from a CLI tooling
perspective.
This consumes logback in CLI, and excludes core's slf4j-simple
dependency. This allows us to define multiple appenders, one for STDOUT
and one for STDERR.
WARN messages and lower are written to STDOUT. ERROR is written to
STDERR.
* [cli] Limit logs to match prev implementation
* Remove slf4j-simple from core project, to avoid conflicts with consumer logger implementations