Versions in this module Expand all Collapse all v5 v5.3.0 Jun 16, 2023 Changes in this version + const ExtW3SecurityApiLifecycle + const ExtW3SecurityApiReleases + const ExtW3SecurityApiResource + const ExtW3SecurityApiStability + const ExtW3SecurityApiVersion + const ExtW3SecurityDeprecatedBy + const ExtW3SecurityIncludeHeaders + const ExtW3SecuritySunsetEligible + const SpecGlobPattern + const SunsetBeta + const SunsetExperimental + const SunsetGA + const SunsetWIP + var ErrNoMatchingVersion = fmt.Errorf("no matching version") + func ExtensionString(extensions map[string]interface{}, key string) (string, error) + func IncludeHeaders(doc *Document) error + func IsExtensionNotFound(err error) bool + func LoadVersions(root fs.FS) ([]*openapi3.T, error) + func Localize(ctx context.Context, doc *Document) error + func Merge(dst, src *openapi3.T, replace bool) + func RemoveElements(doc *openapi3.T, excludes ExcludePatterns) error + func ToSpecJSON(v interface{}) ([]byte, error) + func ToSpecYAML(v interface{}) ([]byte, error) + func VersionDateStrings(vs []Version) []string + func WithGeneratedComment(yamlBuf []byte) ([]byte, error) + type Collator struct + func NewCollator(options ...CollatorOption) *Collator + func (c *Collator) Collate(rv *ResourceVersion) error + func (c *Collator) Result() *openapi3.T + type CollatorOption func(*Collator) + func StrictTags(strict bool) CollatorOption + func UseFirstRoute(useFirstRoute bool) CollatorOption + type Document struct + func NewDocumentFile(specFile string) (_ *Document, returnErr error) + func NewResolvedDocument(t *openapi3.T, url *url.URL) *Document + func (d *Document) Lifecycle() (Lifecycle, error) + func (d *Document) LoadReference(relPath, refPath string, target interface{}) (_ string, returnErr error) + func (d *Document) Location() *url.URL + func (d *Document) MarshalJSON() ([]byte, error) + func (d *Document) RelativePath() string + func (d *Document) ResolveRefs() error + func (d *Document) Version() (Version, error) + type ExcludePatterns struct + ExtensionPatterns []string + HeaderPatterns []string + Paths []string + type Inliner struct + func NewInliner() *Inliner + func (in *Inliner) AddRef(ref string) + func (in *Inliner) Inline(doc *openapi3.T) error + func (in *Inliner) Struct(v reflect.Value) error + func (in *Inliner) StructField(field reflect.StructField, v reflect.Value) error + type Lifecycle int + const ExperimentalTTL + const LifecycleDeprecated + const LifecycleReleased + const LifecycleSunset + const LifecycleUnreleased + func ParseLifecycle(s string) (Lifecycle, error) + func (l Lifecycle) String() string + func (l Lifecycle) Valid() bool + type RefIndex struct + func NewRefIndex(doc *openapi3.T) (*RefIndex, error) + func (*RefIndex) StructField(field reflect.StructField, v reflect.Value) error + func (ix *RefIndex) HasRef(ref string) bool + func (ix *RefIndex) Struct(v reflect.Value) error + type RefRemover struct + func NewRefRemover(target interface{}) *RefRemover + func (rr *RefRemover) RemoveRef() error + func (rr *RefRemover) Struct(v reflect.Value) error + func (rr *RefRemover) StructField(field reflect.StructField, v reflect.Value) error + type ResourceVersion struct + Name string + Version Version + func (rv *ResourceVersion) Validate(ctx context.Context) error + type ResourceVersions struct + func LoadResourceVersions(epPath string) (*ResourceVersions, error) + func LoadResourceVersionsFileset(specYamls []string) (*ResourceVersions, error) + func (rv *ResourceVersions) At(vs string) (*ResourceVersion, error) + func (rv *ResourceVersions) Name() string + func (rv *ResourceVersions) Versions() VersionSlice + type SpecVersions struct + func LoadSpecVersions(root string) (*SpecVersions, error) + func LoadSpecVersionsFileset(epPaths []string) (*SpecVersions, error) + func (sv *SpecVersions) At(v Version) (*openapi3.T, error) + func (sv *SpecVersions) Versions() VersionSlice + type Stability int + const StabilityBeta + const StabilityExperimental + const StabilityGA + const StabilityWIP + func MustParseStability(s string) Stability + func ParseStability(s string) (Stability, error) + func (s Stability) Compare(sr Stability) int + func (s Stability) String() string + type Version struct + Date time.Time + Stability Stability + func MustParseVersion(s string) Version + func ParseVersion(s string) (Version, error) + func (v *Version) LifecycleAt(t time.Time) Lifecycle + func (v Version) AddDays(days int) Version + func (v Version) Compare(vr Version) int + func (v Version) DateString() string + func (v Version) DeprecatedBy(vr Version) bool + func (v Version) String() string + func (v Version) Sunset(vr Version) (time.Time, bool) + type VersionIndex struct + func NewVersionIndex(vs VersionSlice) (vi VersionIndex) + func (vi *VersionIndex) Deprecates(q Version) (Version, bool) + func (vi *VersionIndex) Resolve(query Version) (Version, error) + type VersionSlice []Version + func (vs VersionSlice) Len() int + func (vs VersionSlice) Less(i, j int) bool + func (vs VersionSlice) Strings() []string + func (vs VersionSlice) Swap(i, j int)