OpenAPI.NET.OData/src/OoasUtil/README.md
Gareth Jones c1aa5a6f94
Add model reference support to library and command line utility. (#81)
* Support many conversion options in the command-line tool.
Support local reference files in file-based csdl in the library and command-line tool.

* Added tests for references.

* Updates from github review.
2021-01-14 16:56:26 -08:00

1.7 KiB

OoasUtil Command

Name

OoasUtil.exe - General executable application used used to create Open Api 3.0 document based on OData Edm input.

Synopsis


OoasUtil.exe [--help|-h] [--version|-v] [Options]

Description

OoasUtil.exe is a tool used to convert CSDL to Open API document.

Options

[--json|-j]

Output the "JSON" format Open API document;

[--yaml|-y]

Output the "YAML" format Open API document;

[--keyassegment|-k]

Output the document using key-as-segment style URLs.;

[--derivedtypesreferencesforresponses|-drs]

Output the document to expect all derived types in responses.;

[--derivedtypesreferencesforrequestbody|-drq]

Output the document to expect all derived types in request bodies.;

[--enablepagination|-p]

Output the document to expose pagination for collections.;

[--enableunqualifiedcall|-u]

Output the document to use unqualified calls for bound operations.;

[--disableschemaexamples|-x]

Output the document without examples in the schema.;

[--yaml|-y]

Output the "YAML" format Open API document;

[--specversion|-s int]

Indicate which version, either 2 or 3, of the OpenApi specification to output. Only 2 or 3 are supported;

[--input|-i file]

Indicate to where to get CSDL, from file or from Uri.

[--output|-o file]

Indicate to output file name.

Examples

OoasUtil.exe -j -k -drs -drq -p -u -s 3 -i http://services.odata.org/TrippinRESTierService -o trip.json

The content of trip.json is similar at https://github.com/xuzhg/OData.OpenAPI/blob/master/Microsoft.OData.OpenAPI/Microsoft.OData.OpenAPI.Tests/Resources/TripService.OpenApi.json