Skip to content

Commit

Permalink
Fixed comment's formatting and updated Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabricio Ferreira committed Apr 25, 2024
1 parent 40874d2 commit 4671c6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/DocFxOpenApi/Domain/CommandlineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ namespace DocFxOpenApi.Domain
using CommandLine;

/// <summary>
/// Class for command line options.
/// Class for command line options.
/// </summary>
public class CommandlineOptions
{
/// <summary>
/// Gets or sets the folder with specifications.
/// Gets or sets the folder with specifications.
/// </summary>
[Option('s', "specsource", Required = true, HelpText = "Folder or File containing the OpenAPI specification.")]
public string? SpecSource
Expand All @@ -22,24 +22,24 @@ public string? SpecSource
}

/// <summary>
/// Gets or sets the output folder.
/// Gets or sets the output folder.
/// </summary>
[Option('o', "outputfolder", Required = false, HelpText = "Folder to write the resulting specifications in.")]
public string? OutputFolder { get; set; }

/// <summary>
/// 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.
/// </summary>
[Option('v', "verbose", Required = false, HelpText = "Show verbose messages.")]
public bool Verbose { get; set; }

/// <summary>
/// Gets the folder with specifications, if the source is a folder.
/// Gets the folder with specifications, if the source is a folder.
/// </summary>
public string? SpecFolder { get; private set; }

/// <summary>
/// Gets the file with specifications, if the source is a file.
/// Gets the file with specifications, if the source is a file.
/// </summary>
public string? SpecFile { get; private set; }

Expand Down
11 changes: 6 additions & 5 deletions src/DocFxOpenApi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ This tool converts existing [OpenAPI](https://www.openapis.org/) specification f

```text
DocFxOpenApi -s <specs folder> [-o <output folder>] [-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.

Expand Down

0 comments on commit 4671c6f

Please sign in to comment.