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

openapi

package
v0.0.0-...-7e49e76 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package openapi lints OpenAPI 3.0/3.1 documents against the API design rules of the specification.

Index

Constants

View Source
const (
	RuleVersionPath = "version-path-prefix"
	RuleLocale      = "locale-not-in-url"
	RuleEnvelope    = "success-data-envelope"
	RuleProblemJSON = "error-problem-json"
	RuleIdempotent  = "idempotent-tag"
	RuleNoBatch     = "no-batch-requests"
	RuleBearer      = "bearer-jwt-auth" //nolint:gosec // G101: rule ID, not a credential
)

Rule IDs reported by Lint in addition to the ones shared with package jsonrules.

Variables

This section is empty.

Functions

func Lint

func Lint(data []byte) ([]finding.Finding, error)

Lint checks an OpenAPI 3.x document (YAML or JSON) and returns its findings sorted with finding.Sort. It returns an error only when data cannot be parsed or is not an OpenAPI 3.x document.

Types

This section is empty.

Jump to

Keyboard shortcuts

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