To provide a means to tie together all related information for a given set of OpenAPI specifications including information regarding:
In a singular file, instead of passed on the command line and/or embedded in the OpenAPI input file, or batch files.
The design of the file formats chosen here promotes a documentation-centric model for both settings and OpenAPI spec authoring.
The ‘Literate’ file format is CommonMark document that has embedded code-blocks
for machine-readable sections. The this encourages easy-to-author documentation while permitting the specificity
desired when authoring and processing instructions.
Generally speaking, it is preferable that the documentation section that follows a given code-block
applies to that code-block
.
Using AutoRest with Literate files is as simple as possible without the user having to understand convoluted mechanisms in order to do day-to-day work with the tool.
The usage is consistent regardless of how AutoRest is used (ie, from the command line, as a language service in VSCode, or in a CI/CD system.)
This includes authoring and execution support for using AutoRest
OpenAPI
file, with a specific set of settingscomposite-modeler
), but allow for individually generating SDKs, or merge them based into one.OpenAPI
files, in parallel for a given set of language generatorsSince AutoRest has moved towards a pluggable extension model where generators, validators and transformer can be implemented out-of-proc in any language, the intention is that AutoRest implement the support to handle the Literate file formats, and the individual extensions can simply request the processed object model, and not have to do any coding to process or parse the CommonMark file formats.
AutoRest can transparently process a JSON
file, a YAML
file or a Literate document for any purpose that is necessary, and an author can substitute one for another if it contains the information required.
AutoRest can also be used to ‘preprocess’ a given file into a JSON
or YAML
for consumption by other tools that are not able to process a Literate file.
The specification for the Literate Configuration