Documentation ¶
Index ¶
- func Build(ctx context.Context, project *config.Project, startDate vervet.Version, ...) error
- func CheckBreakingChanges(docs DocSet) error
- func CheckSingleVersionResourceToBeBeforeLatestVersion(paths []string, latestVersion vervet.Version) error
- func FindServers(api *config.API) (openapi3.Servers, error)
- func MapStabilityLevel(s vervet.Stability) string
- func NewRefResolver() refResolver
- func ResourceSpecFiles(resource *config.ResourceSet) ([]string, error)
- type DocSet
- type DocWriter
- type OpKey
- type Operations
- type VersionSet
- type VersionedDoc
- type VersionedOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build( ctx context.Context, project *config.Project, startDate vervet.Version, versioningUrl string, appendOutputFiles bool, ) error
Build compiles the versioned resources in a project configuration based on simplified versioning rules, after the start date.
func CheckBreakingChanges ¶ added in v8.1.0
func CheckSingleVersionResourceToBeBeforeLatestVersion ¶ added in v8.2.0
func FindServers ¶ added in v8.7.2
FindServers returns the servers defined in the first version in the first resource of the API type.
func MapStabilityLevel ¶ added in v8.6.1
func MapStabilityLevel(s vervet.Stability) string
MapStabilityLevel maps the vervet stability level to the x-API stability level header.
func NewRefResolver ¶
func NewRefResolver() refResolver
func ResourceSpecFiles ¶
func ResourceSpecFiles(resource *config.ResourceSet) ([]string, error)
Types ¶
type DocSet ¶
type DocSet []VersionedDoc
type DocWriter ¶ added in v8.0.1
type DocWriter struct {
// contains filtered or unexported fields
}
type Operations ¶
type Operations map[OpKey]VersionSet
func (Operations) Build ¶
func (ops Operations) Build(startVersion vervet.Version, servers openapi3.Servers) DocSet
func (Operations) VersionDates ¶
func (ops Operations) VersionDates() []time.Time
type VersionSet ¶
type VersionSet []VersionedOp
func (VersionSet) Annotate ¶
func (vs VersionSet) Annotate()
Annotate adds Snyk specific extensions to openapi operations. These extensions are:
- x-snyk-api-version: version where the operation was defined
- x-snyk-api-releases: all versions of this api
- x-snyk-deprecated-by: if there is a later version of this operation, the version of that operation
- x-snyk-sunset-eligible: the date after this operation can be sunset
- x-snyk-api-resource: what resource this operation acts on
- x-snyk-api-lifecycle: status of the operation, can be one of: [ unreleased, released, deprecated, sunset ]
type VersionedDoc ¶
func (VersionedDoc) ApplyOverlays ¶ added in v8.0.1
type VersionedOp ¶
Click to show internal directories.
Click to hide internal directories.