inforules

package
v1.70.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package inforules holds the spec's Info, Contact and License Object rules, shared by the validator and the builder so the two cannot disagree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object string

Object is the spec section anchor of the object a Problem is about.

const (
	ObjectInfo    Object = "info-object"
	ObjectContact Object = "contact-object"
	ObjectLicense Object = "license-object"
)

type Problem

type Problem struct {
	// Path is the full path of the offending field, e.g. "info.license.name".
	Path string
	// Field is the field's own name, e.g. "name".
	Field string
	// Object is the specification object that defines the field.
	Object Object
	// Value is the offending value, or "" when the problem is a missing field.
	Value string
	// Message describes the problem without naming the path.
	Message string
}

Problem is one broken rule.

func Check

func Check(info *parser.Info, version parser.OASVersion) []Problem

Check returns every rule info breaks for version, in a fixed order. A nil info returns nil; reporting a missing info is the caller's job.

Jump to

Keyboard shortcuts

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