openapi

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

Description

Checks that all openapi file is valid.

Settings example

Module level

This linter has settings.

linters-settings:
  openapi:
    exclude-rules:
      enum:
        - "properties.storageClass.properties.provision.items.properties.type"
        - "properties.storageClass.properties.provision.items.oneOf[*].properties.type"
      ha-absolute-keys:
        - "properties.storageClass.properties.provision.items.properties.type"
      key-banned-names:
        - "properties.storageClass.properties.provision.items.properties.type"
      crd-names:
        - projects.deckhouse.io
        - projecttemplates.deckhouse.io
    impact: error

Enum

From kubernetes/api-conventions:

Some fields will have a list of allowed values (enumerations). These values will be strings, and they will be in CamelCase, with an initial uppercase letter. Examples: ClusterFirst, Pending, ClientIP.

When an acronym or initialism each letter in the acronym should be uppercase, such as with ClientIP or TCPDelay.

When a proper name or the name of a command-line executable is used as a constant the proper name should be represented in consistent casing - examples: systemd, iptables, IPVS, cgroupfs, Docker (as a generic concept), docker (as the command-line executable). If a proper name is used which has mixed capitalization like eBPF that should be preserved in a longer constant such as eBPFDelegation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAPI

type OpenAPI struct {
	ErrorList *errors.LintRuleErrorsList
	// contains filtered or unexported fields
}

OpenAPI linter

func New

func New(cfg *config.ModuleConfig, errorList *errors.LintRuleErrorsList) *OpenAPI

func (*OpenAPI) Desc

func (o *OpenAPI) Desc() string

func (*OpenAPI) Name

func (o *OpenAPI) Name() string

func (*OpenAPI) Run

func (o *OpenAPI) Run(m *module.Module)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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