constructor

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 2 Imported by: 0

README

Constructor API Examples

Simple examples demonstrating the JSON Schema Constructor API for programmatic schema building.

Running the Example

go run main.go

What's Demonstrated

The example showcases the Constructor API's key capabilities:

  • Basic Types: String, integer, array, and object schemas with validation keywords
  • Value Constraints: Constant values and enumerations
  • Schema Composition: OneOf, AnyOf, AllOf, and conditional logic
  • Convenience Functions: Pre-built schemas for common formats (email, UUID, datetime)
  • Immediate Validation: Direct validation without compilation steps

Documentation

Complete API reference: docs/constructor.md

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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