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 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 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
}
func NewWriter ¶ added in v8.0.1
NewWriter initialises any output paths, removing existing files and directories if they are present.
func (*DocWriter) Write ¶ added in v8.0.1
func (out *DocWriter) Write(doc VersionedDoc) error
Write writes compiled specs to a single directory in YAML and JSON formats. Call Finalize after to populate other directories.
type Operations ¶
type Operations map[OpKey]VersionSet
func (Operations) Build ¶
func (ops Operations) Build(startVersion vervet.Version) 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.