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

openapi

package
v0.33.28 Latest Latest
Warning

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

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

Documentation

Overview

Package openapi validates the OpenAPI schemas a package ships under openapi/. Only the top level of the directory is read, because that is where the runtime looks a package's schemas up. Its rules encode schema contracts rather than preferences, so the linter carries no .pkglint.yaml settings and its rules always report at their built-in severity.

Index

Constants

View Source
const LinterID = "openapi"

LinterID is the stable identifier used to reference this linter in diagnostics.

Variables

Scopes lists the verification targets this linter is processed in. openapi/ is packaged into both images, so the schemas are checked everywhere they ship.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path string
}

Config holds the path required to construct a Linter.

type Linter

type Linter struct {
	// contains filtered or unexported fields
}

Linter runs OpenAPI schema rules against a package directory.

func NewLinter

func NewLinter(cfg Config, res *diag.Collector) *Linter

NewLinter constructs a Linter from cfg, scoping its diagnostics to this linter.

func (*Linter) Lint

func (l *Linter) Lint(ctx context.Context)

Lint executes the openapi rules against the configured package path.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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