Documentation
¶
Index ¶
- Constants
- func CompileSchema(root *yaml.Node) (*santhoshjsonschema.Schema, error)
- func EnsureRootSchema(root *yaml.Node, schemaURL string)
- func FindNodeByLocation(root *yaml.Node, location []string) (*yaml.Node, string)
- func HasSchemaKeyword(root *yaml.Node) bool
- func InstanceLocationPointer(location []string) string
- func IsDelegatingRefRoot(root *yaml.Node) bool
- func IsDynamicScopeIndexingError(err *index.IndexingError) bool
- func IsDynamicScopeResolvingError(err *index.ResolvingError) bool
- func IsFragmentRoot(root *yaml.Node) bool
- func IsSupportedDialect(format string) bool
- func MappingValueNode(node *yaml.Node, key string) *yaml.Node
- func NewDoctorDocumentFromRolodexIndex(idx *index.SpecIndex, config RolodexDoctorBuildConfig) (*doctorModel.DrDocument, error)
- func NewReferenceValidationRule() *model.Rule
- func NodeToInterface(node *yaml.Node) (any, error)
- func RootNode(node *yaml.Node) *yaml.Node
- func ToJSON(root *yaml.Node, pretty bool) ([]byte, error)
- type Dialect
- type RolodexDoctorBuildConfig
- type ValidationIssue
Constants ¶
const ( SchemaURL2020 = "https://json-schema.org/draft/2020-12/schema" SchemaURL2019 = "https://json-schema.org/draft/2019-09/schema" SchemaURL07 = "http://json-schema.org/draft-07/schema#" )
Variables ¶
This section is empty.
Functions ¶
func CompileSchema ¶
func CompileSchema(root *yaml.Node) (*santhoshjsonschema.Schema, error)
func EnsureRootSchema ¶
func FindNodeByLocation ¶
func HasSchemaKeyword ¶
func InstanceLocationPointer ¶
func IsDelegatingRefRoot ¶
func IsDynamicScopeIndexingError ¶
func IsDynamicScopeIndexingError(err *index.IndexingError) bool
IsDynamicScopeIndexingError reports whether a libopenapi indexing error came from a dynamic-scope reference keyword.
func IsDynamicScopeResolvingError ¶
func IsDynamicScopeResolvingError(err *index.ResolvingError) bool
IsDynamicScopeResolvingError reports whether a libopenapi resolving error came from a dynamic-scope reference keyword.
func IsFragmentRoot ¶
func IsSupportedDialect ¶
func NewDoctorDocumentFromRolodexIndex ¶
func NewDoctorDocumentFromRolodexIndex(idx *index.SpecIndex, config RolodexDoctorBuildConfig) (*doctorModel.DrDocument, error)
NewDoctorDocumentFromRolodexIndex builds a Doctor document from a libopenapi rolodex root index.
JSON Schema references are foundationally owned by libopenapi's index and rolodex. This builder does not resolve, discover, or reinterpret references; it only turns the already-indexed schema root into Doctor models while Doctor walks the schema graph.
func NewReferenceValidationRule ¶
NewReferenceValidationRule builds the synthetic JSON Schema reference validation rule used by the motor.
Types ¶
type Dialect ¶
type Dialect struct {
Format string
URL string
Draft *santhoshjsonschema.Draft
}
func DetectDialect ¶
type RolodexDoctorBuildConfig ¶
type RolodexDoctorBuildConfig struct {
BuildGraph bool
DeterministicPaths bool
Logger *slog.Logger
RenderChanges bool
StorageRoot string
UseSchemaCache bool
}
RolodexDoctorBuildConfig configures schema-only Doctor document construction from a libopenapi rolodex index.