Documentation
¶
Overview ¶
Package tagparser provides shared tag parsing functionality for schemagen. This module analyzes Go struct tags and extracts jsonschema validation rules, supporting the complete JSON Schema 2020-12 specification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldInfo ¶
type FieldInfo struct {
Name string // Go field name
Type reflect.Type // Go field type
TypeName string // AST-based type name string for reference detection
JSONName string // JSON field name (from json tag or field name)
Tag string // Raw jsonschema tag value
Rules []TagRule // Parsed validation rules
Required bool // Whether field is required (has "required" rule)
Optional bool // Whether field should be optional
}
FieldInfo represents parsed information about a struct field
type TagParser ¶
type TagParser struct {
// contains filtered or unexported fields
}
TagParser handles jsonschema tag parsing with configurable tag name
func NewWithTagName ¶
NewWithTagName creates a new TagParser with custom tag name
func (*TagParser) ParseStructTags ¶
ParseStructTags parses all jsonschema tags in a struct type and returns field information
Click to show internal directories.
Click to hide internal directories.