Skip to main content

Overview

While InstructorPHP can automatically generate schemas from PHP classes, you can also build schemas manually using the JsonSchema API. This provides full control over the JSON Schema structure and is useful for:
  • Dynamic schemas determined at runtime
  • Provider-specific optimizations
  • Legacy JSON Schema integration
  • Performance-sensitive scenarios
See more: Manual Schema Building

Example

Advanced Example: Dynamic Schema