overlay

package
v0.41.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Ref         string                              `json:"$ref,omitempty" yaml:"$ref,omitempty"`
	Target      string                              `json:"target,omitempty" yaml:"target,omitempty"`
	Description string                              `json:"description,omitempty" yaml:"description,omitempty"`
	Update      *yaml.Node                          `json:"update,omitempty" yaml:"update,omitempty"`
	Remove      bool                                `json:"remove,omitempty" yaml:"remove,omitempty"`
	Copy        string                              `json:"copy,omitempty" yaml:"copy,omitempty"`
	Extensions  *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

Action represents an Overlay action or reusable action reference. Ref identifies a reusable action; the other fields provide local overrides. https://spec.openapis.org/overlay/v1.2.0#action-object

func NewAction

func NewAction(action *low.Action) *Action

NewAction creates a new high-level Action instance from a low-level one.

func (*Action) GoLow

func (a *Action) GoLow() *low.Action

GoLow returns the low-level Action instance used to create the high-level one.

func (*Action) GoLowUntyped

func (a *Action) GoLowUntyped() any

GoLowUntyped returns the low-level Action instance with no type.

func (*Action) HasRemove added in v0.41.4

func (a *Action) HasRemove() bool

HasRemove reports whether remove is explicitly set, including a false override.

func (*Action) MarshalYAML

func (a *Action) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Action object.

func (*Action) Render

func (a *Action) Render() ([]byte, error)

Render returns a YAML representation of the Action object as a byte slice.

func (*Action) SetRemove added in v0.41.4

func (a *Action) SetRemove(remove bool)

SetRemove sets remove and preserves an explicit false override when rendering or resolving a reusable action.

type Components added in v0.41.4

type Components struct {
	Actions    *orderedmap.Map[string, *ReusableAction] `json:"actions,omitempty" yaml:"actions,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node]      `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

Components represents a high-level Overlay Components Object. https://spec.openapis.org/overlay/v1.2.0#components-object

func NewComponents added in v0.41.4

func NewComponents(info *low.Components) *Components

NewComponents creates a new high-level Components instance from a low-level one.

func (*Components) GoLow added in v0.41.4

func (i *Components) GoLow() *low.Components

GoLow returns the low-level Components instance used to create the high-level one.

func (*Components) GoLowUntyped added in v0.41.4

func (i *Components) GoLowUntyped() any

GoLowUntyped returns the low-level Components instance with no type.

func (*Components) MarshalYAML added in v0.41.4

func (i *Components) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Components object.

func (*Components) Render added in v0.41.4

func (i *Components) Render() ([]byte, error)

Render returns a YAML representation of the Components object as a byte slice.

type Info

type Info struct {
	Title       string                              `json:"title,omitempty" yaml:"title,omitempty"`
	Version     string                              `json:"version,omitempty" yaml:"version,omitempty"`
	Description string                              `json:"description,omitempty" yaml:"description,omitempty"`
	Extensions  *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

Info represents a high-level Overlay Info Object. https://spec.openapis.org/overlay/v1.1.0#info-object

func NewInfo

func NewInfo(info *low.Info) *Info

NewInfo creates a new high-level Info instance from a low-level one.

func (*Info) GoLow

func (i *Info) GoLow() *low.Info

GoLow returns the low-level Info instance used to create the high-level one.

func (*Info) GoLowUntyped

func (i *Info) GoLowUntyped() any

GoLowUntyped returns the low-level Info instance with no type.

func (*Info) MarshalYAML

func (i *Info) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the Info object.

func (*Info) Render

func (i *Info) Render() ([]byte, error)

Render returns a YAML representation of the Info object as a byte slice.

type Overlay

type Overlay struct {
	Self       string                              `json:"$self,omitempty" yaml:"$self,omitempty"`
	Components *Components                         `json:"components,omitempty" yaml:"components,omitempty"`
	Overlay    string                              `json:"overlay,omitempty" yaml:"overlay,omitempty"`
	Info       *Info                               `json:"info,omitempty" yaml:"info,omitempty"`
	Extends    string                              `json:"extends,omitempty" yaml:"extends,omitempty"`
	Actions    []*Action                           `json:"actions,omitempty" yaml:"actions,omitempty"`
	Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

Overlay represents a high-level OpenAPI Overlay document. https://spec.openapis.org/overlay/v1.2.0

func NewOverlay

func NewOverlay(overlay *low.Overlay) *Overlay

NewOverlay creates a new high-level Overlay instance from a low-level one.

func (*Overlay) GoLow

func (o *Overlay) GoLow() *low.Overlay

GoLow returns the low-level Overlay instance used to create the high-level one.

func (*Overlay) GoLowUntyped

func (o *Overlay) GoLowUntyped() any

GoLowUntyped returns the low-level Overlay instance with no type.

func (*Overlay) MarshalYAML

func (o *Overlay) MarshalYAML() (interface{}, error)

MarshalYAML creates a ready to render YAML representation of the Overlay object.

func (*Overlay) Render

func (o *Overlay) Render() ([]byte, error)

Render returns a YAML representation of the Overlay object as a byte slice.

func (*Overlay) ResolveExtends added in v0.41.4

func (o *Overlay) ResolveExtends(baseURI string) (string, error)

ResolveExtends resolves extends against $self, then baseURI. baseURI is the retrieval URI, encapsulating entity URI, or application default supplied by the caller. With no absolute base, extends is returned unchanged. It performs no I/O.

type ReusableAction added in v0.41.4

type ReusableAction struct {
	Description string                              `json:"description,omitempty" yaml:"description,omitempty"`
	Fields      *Action                             `json:"fields,omitempty" yaml:"fields,omitempty"`
	Extensions  *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

ReusableAction represents a high-level Overlay ReusableAction Object. https://spec.openapis.org/overlay/v1.2.0#reusable-action-object

func NewReusableAction added in v0.41.4

func NewReusableAction(info *low.ReusableAction) *ReusableAction

NewReusableAction creates a new high-level ReusableAction instance from a low-level one.

func (*ReusableAction) GoLow added in v0.41.4

func (i *ReusableAction) GoLow() *low.ReusableAction

GoLow returns the low-level ReusableAction instance used to create the high-level one.

func (*ReusableAction) GoLowUntyped added in v0.41.4

func (i *ReusableAction) GoLowUntyped() any

GoLowUntyped returns the low-level ReusableAction instance with no type.

func (*ReusableAction) MarshalYAML added in v0.41.4

func (i *ReusableAction) MarshalYAML() (any, error)

MarshalYAML creates a ready to render YAML representation of the ReusableAction object.

func (*ReusableAction) Render added in v0.41.4

func (i *ReusableAction) Render() ([]byte, error)

Render returns a YAML representation of the ReusableAction object as a byte slice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL