Documentation
¶
Overview ¶
Package swagger2 converts a Swagger 2.0 document to the OpenAPI 3 the API gateway reads (#2005). Many generators (swaggo/swag, the usual one for Go APIs) still emit 2.0, and an operator pasting one should not have to know that before saving it. A catalog spec saved or refreshed as 2.0, and the platform's own admin API document, go through the one conversion here.
Index ¶
Constants ¶
View Source
const ConvertedFrom = "swagger 2.0"
ConvertedFrom names the format a spec's content was converted from when it was supplied as Swagger 2.0.
Variables ¶
View Source
var ErrNotSwagger = errors.New("swagger2: not a Swagger 2.0 document")
ErrNotSwagger is returned by Convert for a document that does not declare `swagger: "2.0"`.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.