enumvalue

package
v1.10.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package enumvalue projects resolved authored values onto their declared host shapes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(attribute *expr.AttributeExpr, value any) any

Normalize resolves a DSL value through the shared semantic owner and returns its detached declared host shape. It applies declared primitive precision, Bytes text conversion, finalized object names, typed map keys and retained union selection without invoking a custom codec. Nil collections use their declared empty shape and Any retains its raw builtin host representation.

Normalize first uses full semantic resolution. When only root or named ancestry predicates exclude a structurally valid value, it projects the bounded declared shape without establishing semantic admission. Values that neither traversal can project and malformed declarations use CanonicalizeExample's structural fallback for compatibility with callers that separately validate or omit them. The fallback does not establish semantic acceptance and may retain borrowed opaque values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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