internal

package
v0.0.0-...-20f76ab Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertOptions

type ConvertOptions struct {
	MethodAlias         map[string]string
	AllowedContentTypes []string
	Prefix              string
	TrimPrefix          string
	EnvPrefix           string
	Strict              bool
	Logger              *slog.Logger
}

ConvertOptions represent the common convert options for both OpenAPI v2 and v3

type OAS2Builder

type OAS2Builder struct {
	*ConvertOptions
	// contains filtered or unexported fields
}

OAS2Builder the NDC schema builder from OpenAPI 2.0 specification

func NewOAS2Builder

func NewOAS2Builder(schema *rest.NDCHttpSchema, options ConvertOptions) *OAS2Builder

NewOAS2Builder creates an OAS3Builder instance

func (*OAS2Builder) BuildDocumentModel

func (oc *OAS2Builder) BuildDocumentModel(docModel *libopenapi.DocumentModel[v2.Swagger]) error

func (*OAS2Builder) Schema

func (oc *OAS2Builder) Schema() *rest.NDCHttpSchema

Schema returns the inner NDC HTTP schema

type OAS3Builder

type OAS3Builder struct {
	*ConvertOptions
	// contains filtered or unexported fields
}

OAS3Builder the NDC schema builder from OpenAPI 3.0 specification

func NewOAS3Builder

func NewOAS3Builder(schema *rest.NDCHttpSchema, options ConvertOptions) *OAS3Builder

NewOAS3Builder creates an OAS3Builder instance

func (*OAS3Builder) BuildDocumentModel

func (oc *OAS3Builder) BuildDocumentModel(docModel *libopenapi.DocumentModel[v3.Document]) error

func (*OAS3Builder) Schema

func (oc *OAS3Builder) Schema() *rest.NDCHttpSchema

Schema returns the inner NDC HTTP schema

type SchemaInfoCache

type SchemaInfoCache struct {
	Name       string
	Schema     schema.TypeEncoder
	TypeSchema *rest.TypeSchema
}

SchemaInfoCache stores prebuilt information of component schema types.

Jump to

Keyboard shortcuts

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