-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update OpenAPI learn page #9626
Conversation
659cfbc
to
69f0bb0
Compare
df0feb7
to
982df9e
Compare
982df9e
to
18231f0
Compare
Co-authored-by: Maryam Ziyad <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -46,17 +46,43 @@ $ bal openapi [-i | --input] <ballerina-service-file-path> [--json] | |||
[-o | --output] <output-location> | |||
``` | |||
|
|||
### Sanitize OpenAPI | |||
|
|||
The Ballerina to OpenAPI command supports several usages in the Ballerina OpenAPI tool as follows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence seems to be generic. Can we relate it to the title please?
@@ -46,17 +46,43 @@ $ bal openapi [-i | --input] <ballerina-service-file-path> [--json] | |||
[-o | --output] <output-location> | |||
``` | |||
|
|||
### Sanitize OpenAPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanitize OpenAPI what? Can we be more specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing this title to the "OpenAPI sanitize
command usage" or "OpenAPI sanitize
CLI usage"
WDYT @TharmiganK , @SachinAkash01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe we can use Sanitize OpenAPI contract usage
since it gives more context on what we are doing? @lnash94 @TharmiganK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to that, considering the various CLI commands available in OpenAPI tool, prefer to use command options
instead of usage
for the title. The term usage
typically implies a broader scenario in which this functionality might be employed.
For example, in a Ballerina-to-OpenAPI context, 'usage' could include references to CLI commands, compiler plugins, or built-in plugins.
However, in this specific section, we are focusing on CLI options. we need to address this change in other CLI title as well.
| `--json` | Generate the Ballerina service to OpenAPI output as JSON. The default is YAML. | Optional | | ||
| `-s \| --service` | This service name is used to identify the service that needs to be documented as an OpenAPI contract. | Optional | | ||
| `-o\|--output` | Location of the generated OpenAPI contract. If this path is not specified, the output is written to the same directory from which the command is run. | Optional | | ||
|
||
### Sanitize OpenAPI | ||
|
||
The command-line arguments below can be used with the command for each particular purpose as described below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still don't think is necessary. Can just say something along the lines of the following options are available.
Apply changes from the code review
@@ -46,17 +46,43 @@ $ bal openapi [-i | --input] <ballerina-service-file-path> [--json] | |||
[-o | --output] <output-location> | |||
``` | |||
|
|||
### Sanitize OpenAPI contract usage | |||
|
|||
The Sanitize OpenAPI command supports several options in the Ballerina OpenAPI tool as follows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sanitize OpenAPI command supports several options in the Ballerina OpenAPI tool as follows. | |
The `sanitize` subcommand of the Ballerina OpenAPI tool supports the following options. |
| `--json` | Generate the Ballerina service to OpenAPI output as JSON. The default is YAML. | Optional | | ||
| `-s \| --service` | This service name is used to identify the service that needs to be documented as an OpenAPI contract. | Optional | | ||
| `-o\|--output` | Location of the generated OpenAPI contract. If this path is not specified, the output is written to the same directory from which the command is run. | Optional | | ||
|
||
### Sanitize OpenAPI contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be clearer to have the option descriptions where they are mentioned above?
| Command option | Description | Mandatory/Optional | | ||
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | ||
| `-i \| --input` | This specifies the path of the OpenAPI contract file (e.g., `my-api.yaml` or `my-api.json`). | Mandatory | | ||
| `-o \| --output` | The modified OpenAPI file is generated at the same location from which the `bal openapi sanitize` command is executed. You can point to another directory using the `(-o\|--output)` option. | Optional | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would describe the option first and then say if not specified, ...
|
||
| Command option | Description | Mandatory/Optional | | ||
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| | ||
| `-i \| --input` | This specifies the path of the OpenAPI contract file (e.g., `my-api.yaml` or `my-api.json`). | Mandatory | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrasing is not uniform with the rest. Starts with "This ...", unlike others.
Closing this PR since the changes will be included in #9663 |
Purpose
Checklist
Page addition
permalink
to pages.Page removal
redirect_from
on the alternative page.redirections.js
file.Page rename
redirect_from
.redirect_to:
(if applicable).Page restrcuture
permalink
to pages.redirect_from
.redirect_to:
(if applicable).