DocFxOpenApi 1.28.0

This package has a SemVer 2.0.0 package version: 1.28.0+8.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global DocFxOpenApi --version 1.28.0                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local DocFxOpenApi --version 1.28.0                
This package contains a .NET tool you can call from the shell/command line.
#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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.30.0 0 12/18/2024
1.29.0 70 12/16/2024
1.28.0 417 11/26/2024
1.27.0 214 11/21/2024
1.21.0 1,364 9/2/2024
1.20.0 120 8/21/2024
1.19.0 412 5/16/2024
1.18.0 734 1/18/2024
1.17.0 952 12/8/2023
1.16.0 319 11/15/2023
1.15.0 134 11/6/2023
1.14.0 122 11/2/2023
1.13.0 151 10/24/2023
1.12.0 169 10/11/2023
1.11.0 83 10/11/2023
1.10.0 1,321 4/5/2023
1.9.0 314 4/4/2023