diff --git a/src/DocFxOpenApi/Domain/CommandlineOptions.cs b/src/DocFxOpenApi/Domain/CommandlineOptions.cs index 9131ae8..7d0c290 100644 --- a/src/DocFxOpenApi/Domain/CommandlineOptions.cs +++ b/src/DocFxOpenApi/Domain/CommandlineOptions.cs @@ -7,12 +7,12 @@ namespace DocFxOpenApi.Domain using CommandLine; /// - /// Class for command line options. + /// Class for command line options. /// public class CommandlineOptions { /// - /// Gets or sets the folder with specifications. + /// Gets or sets the folder with specifications. /// [Option('s', "specsource", Required = true, HelpText = "Folder or File containing the OpenAPI specification.")] public string? SpecSource @@ -22,24 +22,24 @@ public string? SpecSource } /// - /// Gets or sets the output folder. + /// Gets or sets the output folder. /// [Option('o', "outputfolder", Required = false, HelpText = "Folder to write the resulting specifications in.")] public string? OutputFolder { get; set; } /// - /// Gets or sets a value indicating whether verbose information is shown in the output. + /// Gets or sets a value indicating whether verbose information is shown in the output. /// [Option('v', "verbose", Required = false, HelpText = "Show verbose messages.")] public bool Verbose { get; set; } /// - /// Gets the folder with specifications, if the source is a folder. + /// Gets the folder with specifications, if the source is a folder. /// public string? SpecFolder { get; private set; } /// - /// Gets the file with specifications, if the source is a file. + /// Gets the file with specifications, if the source is a file. /// public string? SpecFile { get; private set; } diff --git a/src/DocFxOpenApi/README.md b/src/DocFxOpenApi/README.md index e180c1e..7ee3830 100644 --- a/src/DocFxOpenApi/README.md +++ b/src/DocFxOpenApi/README.md @@ -6,14 +6,15 @@ This tool converts existing [OpenAPI](https://www.openapis.org/) specification f ```text DocFxOpenApi -s [-o ] [-v] - -s, --specfolder Required. Folder containing the OpenAPI specification. + -s, --specsource Required. Folder or file containing the OpenAPI specification. -o, --outputfolder Folder to write the resulting specifications in. - -v, --verbose Show verbose messages. - --help Display this help screen. - --version Display version information. + -v, --verbose Show verbose messages. + --help Display this help screen. + --version Display version information. ``` -The tool converts any `*.json`, `*.yaml`, `*.yml` file from the provided specification folder into the output folder. It supports JSON or YAML-format, OpenAPI v2 or v3 (including 3.0.1) format files. +When a folder is provided to the `specsource` parameter, the tool converts all `*.json`, `*.yaml`, `*.yml` files in the folder and its subfolders. When a file is provided, the tool converts only that file. +It supports JSON or YAML-format, OpenAPI v2 or v3 (including 3.0.1) format files. If the `-o or --outputfolder` is not provided, the output folder is set to the input specs folder.