slice

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slice

func Slice(spec *openapi3.T, criteria *Criteria) error

Slice creates a minispec containing only operations matching the criteria. It removes non-matching operations and automatically cleans up unused tags and schemas. This ensures the resulting spec is valid and contains no dangling references.

Types

type Criteria

type Criteria struct {
	OperationIDs []string // Match by operation ID
	Tags         []string // Match by tag
	Paths        []string // Match by path (supports parameter normalization)
}

Criteria defines the selection criteria for slicing an OpenAPI spec. Operations matching ANY of the specified criteria will be included (OR logic).

Jump to

Keyboard shortcuts

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