DocFxOpenApi 1.28.0
dotnet tool install --global DocFxOpenApi --version 1.28.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local DocFxOpenApi --version 1.28.0
#tool dotnet:?package=DocFxOpenApi&version=1.28.0
nuke :add-package DocFxOpenApi --version 1.28.0
OpenAPI specification converter for DocFX
This tool converts existing OpenAPI specification files into the format compatible with DocFX (OpenAPI v2 JSON files). It allows DocFX to generate HTML pages from the OpenAPI specification. OpenAPI is also known as Swagger.
Usage
DocFxOpenApi -s <specs folder> [-o <output folder>] [-v]
-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.
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.
If normal return code of the tool is 0, but on error it returns 1.
Warnings, errors and verbose
If the tool encounters situations that might need some action, a warning is written to the output. The table of contents is still created.
If the tool encounters an error, an error message is written to the output. The table of contents will not be created. The tool will return error code 1.
If you want to trace what the tool is doing, use the -v or verbose
flag to output all details of processing the files and folders and creating the table of contents.
Limitations and workarounds
- DocFX only supports generating documentation from OpenAPI v2 JSON files as of May 2021. Therefore the utility converts input files into that format.
- DocFX does not include type definitions as of May 2021.
- The OpenAPI v2 format does not allow providing multiple examples for result payloads. OpenAPI v3 allows providing either a single example or a collection of examples. If a collection of examples is provided, the utility uses the first example as an example in the output file.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.28.0 | 73 | 11/26/2024 |
1.27.0 | 153 | 11/21/2024 |
1.21.0 | 1,335 | 9/2/2024 |
1.20.0 | 114 | 8/21/2024 |
1.19.0 | 368 | 5/16/2024 |
1.18.0 | 701 | 1/18/2024 |
1.17.0 | 929 | 12/8/2023 |
1.16.0 | 298 | 11/15/2023 |
1.15.0 | 130 | 11/6/2023 |
1.14.0 | 118 | 11/2/2023 |
1.13.0 | 147 | 10/24/2023 |
1.12.0 | 163 | 10/11/2023 |
1.11.0 | 79 | 10/11/2023 |
1.10.0 | 1,317 | 4/5/2023 |
1.9.0 | 310 | 4/4/2023 |