Help us shape the future of Go! Take the 2026 Go Developer Survey

specoverlay

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package specoverlay applies OpenAPI Initiative Overlay documents (1.0 and 1.1: ordered actions, each a JSONPath target with update, remove or copy) to an OpenAPI or AsyncAPI description before it is imported. Overlays are how a description is fixed without editing it: add the operationIds it lacks, rename tags, drop internal operations. The original document stays as it was.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(spec []byte, overlays [][]byte) ([]byte, diag.List)

Apply applies each overlay in order to spec and returns the result. An overlay that is not valid, or whose action fails, is FLW-IMPORT-002 and nothing is applied; an action whose target matches nothing is a warning (FLW-IMPORT-001), the usual sign of a stale overlay.

func ApplyTo

func ApplyTo(spec []byte, name string, overlays [][]byte) ([]byte, diag.List)

ApplyTo is Apply for a document known by name (a file name or URL). An overlay whose "extends" names a different document is applied all the same but warned about: "extends" says which document the overlay was written for, and one written for another is usually a mistake. An overlay with no "extends", or a document with no name, is not checked.

Types

This section is empty.

Jump to

Keyboard shortcuts

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