30 Commits

Author SHA1 Message Date
Drago Rosson
2101ea6cf7
Make usage of !include more clear (#14724)
Fixes #14722
2023-02-17 23:44:13 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
Johan Sjöblom
356732d1bd
[kotlin-spring] Adding DocumentationProvider and SwaggerUI (#12184)
* Adding DocumentationProvider and SwaggerUI to Kotlin Spring

* Fixing annotation errors

* Fixes to homeController

* Minor stylistic fixes

* Removing parameter from docs

* Structuring pom, making gradle file similar to pom

* Updating samples
2022-04-27 01:03:32 +08:00
William Cheng
403e9bca44 replace semver versin with just version 2021-04-03 14:46:22 +08:00
Marcono1234
7a3b01a0f6
Update usage.md with current CLI output (#9156) 2021-04-03 11:28:25 +08:00
mentalfoundry
8110884aac
Update usage.md (#8917)
The command examples are out of date.  The 'openapi-generator' command is now 'openapi-generator-cli'.
2021-03-09 15:14:57 +08:00
William Cheng
b888423fd8
Use 3.0 spec in documentations, update docs (#7710)
* update npm set version, use 3_0 spec

* use 3_0 spec in website
2020-10-14 10:13:17 +08:00
dtiller
6909c888d2
[cli] Batch: support multiple/nested !include directive (#7354)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-09-16 22:45:26 -04:00
Jim Schubert
8eea149e14
[doc] Document usage of post-process file feature (#7315) 2020-08-31 13:44:44 +08:00
William Cheng
47b7a0d243
Update documentation with global propperty (#6863)
* update documentation with global propperty

* remove java opts

* remove KotlinNewServerCodegen

* update contributing.md
2020-07-05 18:20:26 +08:00
Jim Schubert
7e5f720f20
Remove deprecations 5.0 (#6060)
* [breaking] Enforce vendor extension naming convention

* [breaking] Rename system properties to global properties

* [docs] Update site with global properties list and usage explanation

* Use proper vendor extension casing in all templates

* Set remaining vendor extensions to convention of lower kebab-cased with x- prefix

* [samples] Regenerate

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java

Before we were adding hasPathParams twice, once with !op.pathParams.isEmpty(), and then again with hasPathParams. This was probably caused by a mistaken merge.

This is causing the difference in samples

Co-authored-by: Richard Whitehouse <richard.whitehouse@metaswitch.com>

* [Samples] Regenerated!

* Fix -D conversion to additional-properties, missed in bat files

* JERSEY2 option changed

* [samples] Regenerate

* [scala][finch] Fix remaining vendor extensions format to conventino

* [scala] The -D option was replaced with --global-property

* [samples] Regenerate

* Fix -DskipFormModel usage which has been moved to --global-property skipFormModel=true

* [samples] Regenerate

Co-authored-by: Richard Whitehouse <richard.whitehouse@metaswitch.com>
2020-05-31 19:14:31 +08:00
Jim Schubert
7d4bbcc29b
[cli] new 'author template' command (#6441)
* [cli] new 'author template' command

This new command allows users to extract templates for authoring
(customization) without the complexity of finding and downloading a
specific directory for their versioned artifact.

Example usage:

```
openapi-generator author template -g java --library webclient
```

This will write all templates with library-specific templates to the
'./out' directory relative to the current directory.

CLI will refer the user to
https://openapi-generator.tech/docs/templating after generation

* [docs] Usage of author template command

* Log warning if author template fails to output requested library
2020-05-28 00:12:59 -04:00
Pierre-Yves FARE
3de587826a
Remove extra bracket in --http-user-agent example. (#6247) 2020-05-11 14:30:20 +08:00
Jim Schubert
e14e5fccf3
[cli][docker] Better expose version/sha information of builds (#5736)
* [cli] Some CLI improvements…

* Introduce --version
* Introduce --help
* Add --sha to version command for short SHA display
* Output Version and SHA details
* In new --version output, display repo and doc site

Additional cleanup to suppress warnings and code quality.

* [docker] Adds labels for metadata

This adds image labels to store metadata on the online and cli docker
images, using standard labels:

* org.opencontainers.image.created
* org.opencontainers.image.revision
* org.opencontainers.image.title
* org.opencontainers.image.version

These can be inspected via 'docker inspect IMAGE_NAME' and may be useful
in tooling/automation or bug reports submitted by users.

For more details on these labels, see:
https://github.com/opencontainers/image-spec/blob/master/annotations.md

* Include version --full for equiv to --version
2020-04-02 11:05:25 +08:00
Johnny Peck
6ad9fbc9a6
Update usage.md (#5443) 2020-02-26 14:25:00 +08:00
Jim Schubert
db47b95fc9
[cli][core] Add support for dry-run and display (#5332)
* 👕🎨 Minor refactor DefaultGenerator

This cleans up some lint warnings and improve general code cleanliness
of DefaultGenerator.

Specifically:

* logger strings are now using the built-in log formatter rather than
  constructing new strings regardless of log level.
* Diamond operators are used where possible
* Some long-unused commented code has been removed
* Lambdas are used where possible
* Redundant operations are merged (HashMap constructor used rather than
  subsequent putAll on a collection, for example)

* [cli][core] Add support for dry-run and display

CLI now supports `--dry-run`, which will output a file change status
similar to git status --porcelain.

The user may also specify `--verbose` for a one-liner below each file
explaining why the change operation might take place.
2020-02-18 20:36:17 -05:00
Sebastien Rosset
527c118210
[codegen] Improve java code comments and argument documentation; Fix issue with ComposedSchema that has undeclared properties (#5316)
* improve documentation

* Add use case of composed schema with additional properties
2020-02-16 20:23:00 -05:00
Simon Alling
58006982a8
Fix typo: "default GitHub in PRs" (#5302) 2020-02-13 15:04:05 +08:00
Jim Schubert
aa7cd4f5af
[docs] Upgrade to Docusaurus 2 (#5271)
* [docs] Upgrade to Docusaurus 2

Due to formatting issues with Docusaurus 1 and code blocks, and upcoming
4.3 and 5.0 releases, this is an upgrade to have more control over
formatting and other functionality.

This adds behavior to have light/dark themes.

As a consequence of upgrading, columnar format on ul element in
generated generator docs had to be moved to css. This will not impact
users viewing the markdown on GitHub because it didn't display the
column format.

This upgrade should improve syntax highlighting and performance.

* Fix user page layout, choose theme with clear diff colors
2020-02-11 21:22:58 +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
c89d21a903 [cli][doc] Document batch command (#4572)
* [cli][batch] Better glob support

If invoked as `openapi-generator batch *.yaml`, the command might
previously fail in some shells where `*.yaml` expands to file name only.

This supports globs without path-part in the filename to prevent
possible NPE.

* [cli] Document batch command
2019-11-22 11:09:08 +08:00
Jim Schubert
a5349cfde5
[cli][gradle] filter deprecated generators by default when listing available generators (#3612)
* Filter deprecated generators from CLI list by default.
* [gradle] Exclude deprecated generators from list by default, add "include" option to allow for customization of list task.
* Update scripts to support the --include option of the list command
* Update gradle/cli docs for generators listing with "include" option.
2019-08-12 08:25:52 -04:00
Jim Schubert
06533b977c
[core][gradle] User-defined server variable substitutions (#3363)
* [core] Initial support for server variable overrides
* [gradle] Support user overrides for serverVariables
* [core] Clarify server variable overrides, and propagate them to templates in the "servers" array
2019-08-11 09:57:36 -04:00
Jim Schubert
a2fb88c1c1
[all] Adds strict spec option (#2783)
* [all] Adds strict spec option

Introduces an option to allow user customization of strict specification
behaviors. For instance, OpenAPI 3.x requires a path object name to be
prefixed with '/' so we append any missing '/', but this may not be
desirable to some users or generators. In this commit, this fix specifically is
the only modification affected.

* Clarify strict-spec docs, add option to README.md

* Update CLI options in docs/usage.md
2019-05-03 10:57:47 -04:00
Jim Schubert
5ea4391af5 [cli][gradle] Adds package name as a global option (#2557)
* [cli] Support packageName as global option

CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.

This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.

* [gradle] Add packagName as global option

This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
2019-05-01 00:46:48 +08:00
Vincent Devos
c941b87067 [ONLINE] Minor links fix (#2644)
- usage : fix link to generator-specified parameters
- usage : fix next page link not found
2019-04-11 23:29:18 +08:00
Vincent Devos
117efe83c0 [Doc] Better highlight of generators docs page with generators specific parameters (#2592)
* [Doc] Better highlight of generators docs page with generators specific parameters

* [Doc] Better highlight of generators docs page with generators specific parameters
2019-04-05 06:38:33 +08:00
dragosnutu
9e391efd1d [#2442] - implement yamlsample config help output; (#2443) 2019-03-26 15:22:59 +08:00
dragosnutu
1f45ea7d1a [#2425] - implemented yaml parsing for config file. (#2434) 2019-03-18 21:49:45 +08:00
Jim Schubert
6fe9a52229 [feat][docs][website] Initial docusaurus based site (#1770)
* Iniital docusaurus based site

* Remove error about default local being used by String.format

* Change pinned users to represent global presence rather than alphabetical order pinning

* Include generator indexes in ensure-up-to-date (docusaurus site and /generators/README)

* Add Font Awesome attribution footer

* Remove feature callout until it is completed

* Include NPM try it out section

* Improve "Getting Started" type docs

* Include new custom template documentation

* Updating templating and customization docs

* Add vendor extension docs

* Cleanup templating page(s).

* Move users to yaml file for easy edit.

* travis configuration, and baseUrl mods to image URLs

* [docs] Migrate FAQ, release summary  from wiki

FAQ has been split into multiple smaller documents to better categorize
and allow users to find what they're looking for (in docs folder or in
new website).

Release summary information (versioning strategy and cadence) has been
migrated from the Wiki and clarified a bit.

Also adds copy button for all code snippets in website.

* Copy current contributing/code of conduct to website

* [docs] Creating a new generator
2019-01-18 17:39:33 +08:00