-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1809 from SachinAkash01/align-bal-openapi
Change the OpenAPI Tool `sanitize` Sub Command Name into `align`
- Loading branch information
Showing
25 changed files
with
209 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
openapi-cli/src/main/resources/cli-help/ballerina-openapi-align.help
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
NAME | ||
bal openapi align - Align the OpenAPI contract file according to | ||
the best practices of Ballerina. | ||
|
||
SYNOPSIS | ||
bal openapi align [-i | --input] <openapi-contract-file-path> | ||
[-o | --output] <output-file-path> | ||
[-n | --name] <generated-file-name> | ||
[-f | --format] [json|yaml] | ||
[-t | --tags] <tag-names> | ||
[--operations] <operation-names> | ||
|
||
DESCRIPTION | ||
Align the OpenAPI contract file according to the best naming | ||
practices of Ballerina. The Ballerina name extensions are added | ||
to the schemas which can not be modified directly. | ||
|
||
|
||
OPTIONS | ||
-i, --input <openapi-contract-file-path> | ||
This is a mandatory input. The given OpenAPI contract will be aligned. | ||
The OpenAPI contract can be either a YAML or a JSON. | ||
|
||
-o, --output <output-file-path> | ||
This is an optional input. The given output file path will be used to | ||
save the aligned OpenAPI contract. The default output file path is | ||
the executed directory. | ||
|
||
-n, --name <generated-file-name> | ||
This is an optional input. The given name will be used to save the | ||
aligned OpenAPI contract. The default name is `aligned_ballerina_openapi`. | ||
|
||
-f, --format [json|yaml] | ||
This is an optional input. The aligned OpenAPI contract will be | ||
saved in the given format. The format can be either JSON or YAML. | ||
The default format is same as the input file format. | ||
|
||
-t, --tags <tag-names> | ||
This is an optional input. The aligned OpenAPI contract will only | ||
have the operations with the given tags. | ||
|
||
--operations <operation-names> | ||
This is an optional input. The aligned OpenAPI contract will only | ||
have the given operations. | ||
|
||
EXAMPLES | ||
Align the `service.yaml` OpenAPI contract file. | ||
$ bal openapi align -i service.yaml | ||
|
||
Align the `service.yaml` OpenAPI contract file and save it as | ||
`aligned_svc.json` file. | ||
$ bal openapi align -i hello.yaml -n aligned_svc -f json | ||
|
||
Align the `service.json` OpenAPI contract file by filtering the | ||
operations with the `service` tag. | ||
$ bal openapi align -i service.json -t service |
56 changes: 0 additions & 56 deletions
56
openapi-cli/src/main/resources/cli-help/ballerina-openapi-sanitize.help
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.