Options documentation

September 18, 2020 ยท View on GitHub

ParameterTypeInput/OutputDescription
agentObjectInputOptional http(s).Agent to be used when fetching resources
allScopesObjectInternalCache of scopes by securityScheme for validation
anchorsBooleanInputAllow use of YAML anchors/aliases. May break things
cacheObjectInputOptional cache of external resources
componentsBooleanInputCommand-line flag to indicate unresolve information should be displayed
contextArrayOutputThe context stack of associated with errors in a validation step, you normally want the last entry only
debugBooleanInputFlag to enable debug mode, adds specification-extensions
directBooleanInputFlag to indicate that only the converted OpenApi definition should be returned, not wrapped in options
encodingStringInputEncoding to use when reading/writing files
expectFailureBooleanInputFlag to invert the status of a validation step
externalRefObjectInternalWhen prevalidate is true, holds the entire object representing an externally $refd file
externalRefsObjectInternalUsed to track resolved external references
externalsArrayOutputInformation required to unresolve a resolved definition back into its component parts
failBooleanInputCommand-line flag used by testRunner
fatalBooleanInputTreat ENOTFOUND and 404 errors as fatal during resolution, otherwise returns empty objects
fileStringInputUsed to pass filename back to testRunner
filtersArray[function]InputInput filters for the resolver (e.g. to convert JSON schema dialects)
fetchfunctionInputUsed to override the internal fetch implementation
fetchOptionsObjectInputAdditional options to be passed to fetch calls
handlersObjectInputMap of additional protocol/scheme handlers, must be functions which return a Promise
helpBooleanReservedCommand-line flag to display help
ignoreIOErrorsBooleanInputSet to true to ignore IO errors when resolving
indentStringInputCommand-line flag to control JSON indenting
isCallbackBooleanInputHint to the linter that we are within a callback object
laxDefaultsBooleanInputFlag to validation step to ignore default/type mismatches
laxurlsBooleanInputFlag to validation step to ignore empty URLs and # ? in paths
lintBooleanInputWhether to lint the document during validation
linterFunctionInputA linter plugin to use in place of the default linter
linterResultsFunctionInputA function to return the set of linter warnings
lintLimitIntegerInputControls how many linter warnings are logged in verbose mode
lintSkipArrayInputA list of lint rule names which will not be tested
mediatypeBooleanInputFlag to validation step to check media-type strings against RFC pattern
metadataObjectOutputUsed by the validator, if options.text is a string, will have a property lines containing the number of lines in the input document. Has a property count, an Object keyed by the object-type within the document having values summarising the number of times that object appears in total.
nopatchBooleanInputCommand-line flag by testRunner to unset patch
openapiObjectOutputThe OpenApi 3.x definition returned from a conversion step
operationIdsArray[string]OutputUsed by validation to track uniqueness of operationIds
originBoolean|StringInputtrue or a URL, to indicate an x-origin extension should be added to the converted output
originalObjectBi-directionalUsed by testRunner to round-trip the original definition, set by non-object ConvertXXX methods
outfileStringInputThe output file to write to
outputBooleanInputInternal flag to testRunner to write output openapi.yaml files
patchBooleanInputFlag to fix-up minor errors in the source definition during conversion
patchesIntegerOutputCount of number of patches applied during conversion
preserveMiroBooleanInputFlag to resolver as to whether to preserve old value of $ref in x-miro, default: false
prevalidateBooleanInputWhether to validate each externally $refd file separately
promiseObjectInternalObject containing resolve and reject functions for the converter
quietBooleanInputCommand-line flag used by testRunner
rbnameStringInputThe name of the vendor extension to use to preserve body parameter names (e.g. x-codegen-request-body-name)
refmapObjectInternalUsed as a mapping between old and new $refs
refSiblingsstringInputControls handling of $ref which has sibling properties. Valid values are remove (to remove such properties) which is the default outside schema objects, preserve to keep the (incorrect) use of sibling properties, and allOf, to wrap the $ref and the remaining sibling properties in an allOf, which is the default/allowed only within schema objects
resolveBooleanInputFlag to enable resolution of external $refs
resolveInternalBooleanInputFlag to enable resolution of internal $refs. Also disables deduplication of requestBodies
resolverObjectInternalUsed by the resolver to track outstanding resolutions
skipBooleanReservedUsed by tools such as Speccy to skip linter rules
stopBooleanInputCommand-line flag used by testRunner
sourceStringInputThe source filename or url of the definition, used by the resolver
sourceYamlBooleanOutputFlag set if the source string, URL or stream contained a YAML formatted definition
targetVersionStringInputUsed to override the default target OpenAPI version of 3.0.0
textStringBothIf not already a truthy value, will be set to the input text of the conversion
throwsBooleanInputUsed by tests only to indicate the fixture should throw an exception
urlStringInputURL of the original definition, used when reading a file to create x-origin extension
validBooleanOutputThe result of a validation step
verboseBooleanInputIncrease verbosity, e.g. show HTTP GET requests
versionBooleanInputCommand-line flag to show version information
warningsArrayOutputWarnings generated by a validation step
warnOnlyBooleanInputDo not throw on non-patchable errors, add warning extensions
warnPropertyStringInputProperty name to use for warning extensions, default x-s2o-warning
whatwgBooleanInputIgnored (enable WHATWG URL parsing in validation step, now the default)
yamlBooleanInputFlag to write YAML, default JSON (overridden by --outfile filepath extension)