tests

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPMethod

type HTTPMethod string

HTTPMethod represents a custom string type for HTTP methods (like openapi.HTTPMethod)

const (
	HTTPMethodGet  HTTPMethod = "get"
	HTTPMethodPost HTTPMethod = "post"
	HTTPMethodPut  HTTPMethod = "put"
)

type TestArrayOfObjectsHighModel added in v1.11.1

type TestArrayOfObjectsHighModel struct {
	marshaller.Model[core.TestArrayOfObjectsModel]
	Items []*TestItemHighModel
}

TestArrayOfObjectsHighModel contains an array of items

type TestComplexHighModel

type TestComplexHighModel struct {
	marshaller.Model[core.TestComplexModel]
	NestedModel            *TestPrimitiveHighModel
	NestedModelValue       TestPrimitiveHighModel
	ArrayField             []string
	NodeArrayField         []string
	StructArrayField       []*TestPrimitiveHighModel
	MapPrimitiveField      *sequencedmap.Map[string, string]
	MapNodeField           *sequencedmap.Map[string, string]
	MapStructField         *sequencedmap.Map[string, *TestPrimitiveHighModel]
	EitherField            *values.EitherValue[string, string, int, int]
	EitherModelOrPrimitive *values.EitherValue[TestPrimitiveHighModel, core.TestPrimitiveModel, int, int]
	RawNodeField           *yaml.Node
	ValueField             valuescore.Value
	ValuesField            []valuescore.Value
	Extensions             *extensions.Extensions
}

type TestEmbeddedMapPointerHighModel added in v1.0.0

type TestEmbeddedMapPointerHighModel struct {
	marshaller.Model[core.TestEmbeddedMapPointerModel]
	*sequencedmap.Map[string, string]
}

TestEmbeddedMapPointerHighModel represents high-level model with pointer embedded sequenced map This tests the legacy pointer embed pattern to ensure backward compatibility

type TestEmbeddedMapWithFieldsPointerHighModel added in v1.0.0

type TestEmbeddedMapWithFieldsPointerHighModel struct {
	marshaller.Model[core.TestEmbeddedMapWithFieldsPointerModel]
	*sequencedmap.Map[string, *TestPrimitiveHighModel]
	NameField  string
	Extensions *extensions.Extensions
}

TestEmbeddedMapWithFieldsPointerHighModel represents high-level model with pointer embedded sequenced map and additional fields This tests the legacy pointer embed pattern with fields to ensure backward compatibility

type TestItemHighModel added in v1.11.1

type TestItemHighModel struct {
	marshaller.Model[core.TestItemModel]
	Name        string
	Description string
}

TestItemHighModel represents an item with a name and description

type TestPrimitiveHighModel

type TestPrimitiveHighModel struct {
	marshaller.Model[core.TestPrimitiveModel]
	StringField     string
	StringPtrField  *string
	BoolField       bool
	BoolPtrField    *bool
	IntField        int
	IntPtrField     *int
	Float64Field    float64
	Float64PtrField *float64
	Extensions      *extensions.Extensions
}

High-level model counterparts for population testing using marshaller.Model

type TestRequiredNilableHighModel

type TestRequiredNilableHighModel struct {
	marshaller.Model[core.TestRequiredNilableModel]
	RequiredPtr     *string
	RequiredSlice   []string
	RequiredMap     *sequencedmap.Map[string, string]
	RequiredStruct  *TestPrimitiveHighModel
	RequiredEither  *values.EitherValue[string, string, int, int]
	RequiredRawNode *yaml.Node
	OptionalPtr     *string
	OptionalSlice   []string
	OptionalMap     *sequencedmap.Map[string, string]
	OptionalStruct  *TestPrimitiveHighModel
	Extensions      *extensions.Extensions
}

type TestRequiredPointerHighModel

type TestRequiredPointerHighModel struct {
	marshaller.Model[core.TestRequiredPointerModel]
	RequiredPtr *string
	OptionalPtr *string
	Extensions  *extensions.Extensions
}

type TestTypeConversionHighModel

type TestTypeConversionHighModel struct {
	marshaller.Model[core.TestTypeConversionCoreModel]
	*sequencedmap.Map[HTTPMethod, *TestPrimitiveHighModel]
	HTTPMethodField *HTTPMethod
	Extensions      *extensions.Extensions
}

TestTypeConversionHighModel represents high-level model with HTTPMethod keys (like openapi.PathItem) This reproduces the issue where high-level model expects HTTPMethod keys but core provides string keys

type TestValidationHighModel

type TestValidationHighModel struct {
	marshaller.Model[core.TestValidationModel]
	RequiredField  string
	OptionalField  *string
	RequiredArray  []string
	OptionalArray  []string
	RequiredStruct *TestPrimitiveHighModel
	OptionalStruct *TestPrimitiveHighModel
	Extensions     *extensions.Extensions
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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