schema

package
v0.0.0-...-4f1e413 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const EnumValueSeparator = ","

Variables

View Source
var AuthorizationHeaderSchema = &oas.SchemaObject{
	ID:          "Authorization",
	FieldName:   "AuthorizationFieldName",
	Type:        "string",
	Description: "Authorization Description",
	Example:     "Bearer 123",
}
View Source
var ContentTypeHeaderSchema = &oas.SchemaObject{
	ID:          "ContentType",
	FieldName:   "ContentTypeFieldName",
	Type:        "string",
	Description: "Content Type Description",
	Example:     "json",
}
View Source
var VersionHeaderSchema = &oas.SchemaObject{
	ID:          "Version",
	FieldName:   "VersionFieldName",
	Type:        "int",
	Description: "Version Description",
	Example:     "101",
}

Functions

func GetSchemaObject

func GetSchemaObject() *oas.SchemaObject

Types

type DECL

type DECL struct {
	Type struct {
		Name string
	}
}

type Parser

type Parser interface {
	GetPkgAst(pkgPath string) (map[string]*ast.Package, error)
	RegisterType(pkgPath, pkgName, typeName string, astExpr ast.Expr) (string, error)
	ParseSchemaObject(pkgPath, pkgName, typeName string, astExpr ast.Expr) (*SchemaObject, error)
}

func NewParser

func NewParser(utils model.Utils, openAPIObject *OpenAPIObject) Parser

func SetupUpSchemaParseMocks

func SetupUpSchemaParseMocks(schemaObject *oas.SchemaObject, err error) Parser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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