openapi

package
v0.23.6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OAuthParamTokenURL     = "token_url"
	OAuthParamAuthURL      = "auth_url"
	OAuthParamRedirectURI  = "redirect_uri"
	OAuthParamClientID     = "client_id"
	OAuthParamClientSecret = "client_secret"
	OAuthParamScope        = "scope"
	OAuthParamAudience     = "audience"
	OAuthParamResource     = "resource"
	OAuthParamGrant        = "grant"
	OAuthParamUsername     = "username"
	OAuthParamPassword     = "password"
	OAuthParamClientAuth   = "client_auth"
	OAuthParamCacheKey     = "cache_key"
	OAuthParamCodeVerifier = "code_verifier"
	OAuthParamCodeMethod   = "code_challenge_method"
	OAuthParamState        = "state"
)
View Source
const (
	OAuthGrantClientCredentials = "client_credentials"
	OAuthGrantPassword          = "password"
	OAuthGrantAuthorizationCode = "authorization_code"
)
View Source
const (
	DefaultBaseURLVariable = "baseUrl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentWriter

type DocumentWriter interface {
	WriteDocument(
		ctx context.Context,
		doc *restfile.Document,
		destination string,
		opts WriterOptions,
	) error
}

type GenerateOptions

type GenerateOptions struct {
	Parse    ParseOptions
	Generate GeneratorOptions
	Write    WriterOptions
}

type Generator

type Generator interface {
	Generate(
		ctx context.Context,
		spec *model.Spec,
		opts GeneratorOptions,
	) (*restfile.Document, error)
}

type GeneratorOptions

type GeneratorOptions struct {
	BaseURLVariable      string
	IncludeDeprecated    bool
	PreferredServerIndex int
}

type ParseOptions

type ParseOptions struct {
	ResolveExternalRefs bool
}

type Parser

type Parser interface {
	Parse(ctx context.Context, path string, opts ParseOptions) (*model.Spec, error)
}

type Service

type Service struct {
	Parser    Parser
	Generator Generator
	Writer    DocumentWriter
}

func (*Service) GenerateHTTPFile

func (s *Service) GenerateHTTPFile(
	ctx context.Context,
	specPath, outputPath string,
	opts GenerateOptions,
) error

type Warner added in v0.23.4

type Warner interface {
	Warnings() []string
}

type WriterOptions

type WriterOptions struct {
	OverwriteExisting bool
	HeaderComment     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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