Documentation
¶
Overview ¶
Package importer turns a vendored OpenAPI document into definitions, the way Pandora's importer-rest-api-specs does for Azure: load the document, apply the named workarounds for its known bugs, then normalise it into the definitions model (Go names, types, status codes, paging, and which tag owns each model).
The importer is strict. Anything it cannot normalise faithfully (an undeclared path parameter, a GET that does not say what it answers, a duplicate operationId) fails the import with every problem listed, and the fix is a workaround that documents the bug (see the workarounds package).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromSpec ¶
func FromSpec(cfg config.Service, spec *openapi.Spec, applied []string, log func(string)) (*definitions.Service, error)
FromSpec normalises an already patched document.
func Import ¶
func Import(cfg config.Service, all []workarounds.Workaround, log func(string)) (*definitions.Service, error)
Import loads a service's document, applies the workarounds among all that are for it and returns the definitions. log receives one line per workaround applied and per warning.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package workarounds is how a repository fixes the bugs in the OpenAPI documents it vendors, one named workaround per bug, after Pandora's dataworkarounds.
|
Package workarounds is how a repository fixes the bugs in the OpenAPI documents it vendors, one named workaround per bug, after Pandora's dataworkarounds. |