openapi3Struct

package module
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 12 Imported by: 0

README

openapi3Struct

Openapi3 struct parser

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(p Parser) Parser

func WithPackagePaths added in v0.0.9

func WithPackagePaths(paths []string) Option

type Parser

type Parser struct {
	T openapi3.T
	// contains filtered or unexported fields
}

func NewParser

func NewParser(t openapi3.T, options ...Option) *Parser

func (*Parser) AddPath

func (p *Parser) AddPath(path Path)

func (*Parser) ParseSchemasFromStructs

func (p *Parser) ParseSchemasFromStructs() error

func (*Parser) SaveJsonToFile

func (p *Parser) SaveJsonToFile(path string) error

func (*Parser) SaveYamlToFile

func (p *Parser) SaveYamlToFile(path string) error

func (*Parser) Validate

func (p *Parser) Validate(ctx context.Context) error

Validate resolves refs and validates schema

type Path

type Path struct {
	Path string
	Item openapi3.PathItem
}

Jump to

Keyboard shortcuts

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