[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.
This commit is contained in:
Jim Schubert 2020-02-03 03:08:51 -05:00 committed by GitHub
parent 97ff9b4be7
commit 7d366ad6ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 33 deletions

View File

@ -230,7 +230,7 @@ An example bash completion script can be found in the repo at [scripts/openapi-g
## generate
The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The options are abbreviated below, but you may expand the full descriptions.
The `generate` command is the workhorse of the generator toolset. As such, it has _many_ more options and the previous commands. The abbreviated options are below, but you may expand the full descriptions.
```bash
@ -444,6 +444,8 @@ At a minimum, `generate` requires:
* `-o` to specify a meaningful output directory (defaults to the current directory!)
* `-i` to specify the input OpenAPI document
> **NOTE** You may also pass `-Dcolor` as a system property to colorize terminal outputs.
### Examples
The following examples use [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml).

View File

@ -123,9 +123,6 @@
"title": "Config Options for csharp-netcore",
"sidebar_label": "csharp-netcore"
},
"generators/csharp-refactor": {
"title": "generators/csharp-refactor"
},
"generators/csharp": {
"title": "Config Options for csharp",
"sidebar_label": "csharp"
@ -186,9 +183,6 @@
"title": "Config Options for fsharp-giraffe-server",
"sidebar_label": "fsharp-giraffe-server"
},
"generators/fsharp-giraffe": {
"title": "generators/fsharp-giraffe"
},
"generators/go-experimental": {
"title": "Config Options for go-experimental",
"sidebar_label": "go-experimental"
@ -213,16 +207,10 @@
"title": "Config Options for graphql-schema",
"sidebar_label": "graphql-schema"
},
"generators/graphql-server": {
"title": "generators/graphql-server"
},
"generators/groovy": {
"title": "Config Options for groovy",
"sidebar_label": "groovy"
},
"generators/grpc-schema": {
"title": "generators/grpc-schema"
},
"generators/haskell-http-client": {
"title": "Config Options for haskell-http-client",
"sidebar_label": "haskell-http-client"
@ -259,6 +247,10 @@
"title": "Config Options for java-undertow-server",
"sidebar_label": "java-undertow-server"
},
"generators/java-vertx-web": {
"title": "Config Options for java-vertx-web",
"sidebar_label": "java-vertx-web"
},
"generators/java-vertx": {
"title": "Config Options for java-vertx",
"sidebar_label": "java-vertx"
@ -335,6 +327,10 @@
"title": "Config Options for lua",
"sidebar_label": "lua"
},
"generators/markdown": {
"title": "Config Options for markdown",
"sidebar_label": "markdown"
},
"generators/mysql-schema": {
"title": "Config Options for mysql-schema",
"sidebar_label": "mysql-schema"
@ -351,16 +347,10 @@
"title": "Config Options for nodejs-server-deprecated",
"sidebar_label": "nodejs-server-deprecated"
},
"generators/nodejs-server": {
"title": "generators/nodejs-server"
},
"generators/objc": {
"title": "Config Options for objc",
"sidebar_label": "objc"
},
"generators/ocaml-client": {
"title": "generators/ocaml-client"
},
"generators/ocaml": {
"title": "Config Options for ocaml",
"sidebar_label": "ocaml"
@ -389,9 +379,13 @@
"title": "Config Options for php-silex",
"sidebar_label": "php-silex"
},
"generators/php-slim": {
"title": "Config Options for php-slim",
"sidebar_label": "php-slim"
"generators/php-slim-deprecated": {
"title": "Config Options for php-slim-deprecated",
"sidebar_label": "php-slim-deprecated"
},
"generators/php-slim4": {
"title": "Config Options for php-slim4",
"sidebar_label": "php-slim4"
},
"generators/php-symfony": {
"title": "Config Options for php-symfony",
@ -476,16 +470,10 @@
"title": "Config Options for scala-httpclient-deprecated",
"sidebar_label": "scala-httpclient-deprecated"
},
"generators/scala-httpclient": {
"title": "generators/scala-httpclient"
},
"generators/scala-lagom-server": {
"title": "Config Options for scala-lagom-server",
"sidebar_label": "scala-lagom-server"
},
"generators/scala-play-framework": {
"title": "generators/scala-play-framework"
},
"generators/scala-play-server": {
"title": "Config Options for scala-play-server",
"sidebar_label": "scala-play-server"
@ -514,6 +502,10 @@
"title": "Config Options for swift4",
"sidebar_label": "swift4"
},
"generators/swift5": {
"title": "Config Options for swift5",
"sidebar_label": "swift5"
},
"generators/typescript-angular": {
"title": "Config Options for typescript-angular",
"sidebar_label": "typescript-angular"
@ -546,6 +538,10 @@
"title": "Config Options for typescript-node",
"sidebar_label": "typescript-node"
},
"generators/typescript-redux-query": {
"title": "Config Options for typescript-redux-query",
"sidebar_label": "typescript-redux-query"
},
"generators/typescript-rxjs": {
"title": "Config Options for typescript-rxjs",
"sidebar_label": "typescript-rxjs"

View File

@ -125,6 +125,28 @@ class Index extends React.Component {
</div>
);
const connectContents = stripMargin`
| **Connect** with us on Slack!
|
| We're a very community-oriented project. We have an active community of users, contributors, and core team members on Slack. Slack is often a good
| place to start if you're looking for guidance about where to begin contributing, if you have an idea you're
| not sure fits the project, or if you just want to ask a question or say hello.
|
| Slack is free to [download](https://slack.com/downloads), and our workspace is free to [sign up](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM).
`;
const ConnectOnSlack = () => (
<Block id="connectOnSlack">
{[
{
content: `${connectContents}`,
image: `${baseUrl}img/tools/Slack_Mark-256x256-3a29a6b.png`,
imageAlign: 'left',
title: 'Active Community',
},
]}
</Block>
);
const tryHomebrewContents = stripMargin`
| **Install** via [homebrew](https://brew.sh/):
|
@ -162,6 +184,8 @@ class Index extends React.Component {
| -g go \\
| -o /local/out/go
| \`\`\`
|
| For a full list of our docker images, check out [u/openapitools](https://hub.docker.com/u/openapitools) on Docker Hub.
`;
const TryOutDocker = () => (
<Block id="tryDocker">
@ -179,7 +203,9 @@ class Index extends React.Component {
const tryNpmContents = stripMargin`
| The [NPM package wrapper](https://github.com/openapitools/openapi-generator-cli) is cross-platform wrapper around the .jar artifact.
| **Install** globally, exposing the CLI on the command line:
|
| <!-- RELEASE_VERSION -->
|
| \`\`\`bash
| # install the latest version of "openapi-generator-cli"
| npm install @openapitools/openapi-generator-cli -g
@ -190,7 +216,8 @@ class Index extends React.Component {
| # Or install it as dev-dependency in your node.js projects
| npm install @openapitools/openapi-generator-cli -D
| \`\`\`
|<!-- /RELEASE_VERSION -->
|
| <!-- /RELEASE_VERSION -->
|
| Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc:
| \`\`\`bash
@ -229,17 +256,17 @@ class Index extends React.Component {
<Block background="light">
{[
{
content: 'OpenAPI Generator supports many different integrations and use cases, including (but not limited to):\n\n' +
content: 'OpenAPI Generator supports many different integrations and use cases, including (but not limited to):\n' +
'* Maven Plugin\n' +
'* Gradle Plugin\n' +
'* Bazel Plugin\n' +
'* CLI via Homebrew\n' +
'* CLI via Docker\n' +
'* CLI via npm\n' +
'* Generator SaaS\n\n' +
'For details, see [Workflow Integrations](' + this.docUrl('integrations.html', this.props.language) + ')\n\n' +
'Generation also allows for easy customization via options, custom templates, or even custom generators on your classpath. ' +
'See [Customization](' + this.docUrl('customization.html', this.props.language) + ') for details.\n\n' +
'As a very community-oriented project, the core team is also active on the project\'s [Slack Workspace](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM).',
'See [Customization](' + this.docUrl('customization.html', this.props.language) + ') for details.',
image: `${baseUrl}img/color-logo.svg`,
imageAlign: 'right',
title: 'Learn How',
@ -358,6 +385,7 @@ class Index extends React.Component {
<Features />
{/*<FeatureCallout />*/}
<LearnHow />
<ConnectOnSlack/>
<TryNpm />
<TryOutHomebrew />
<TryOutDocker />

View File

@ -64,7 +64,8 @@ dd {
#try .blockImage,
#tryHomebrew .blockImage,
#tryDocker .blockImage {
#tryDocker .blockImage,
#connectOnSlack .blockImage {
margin-top: auto;
margin-bottom: auto;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB