API reference / Quittio \ Core \ Serialization
JsonSchemaGenerator
final class in quittio/core
Quittio\Core\Serialization\JsonSchemaGenerator · Source
Generates the JSON Schema (draft 2020-12) of InvoiceData::toArray() from the constructor signatures and mapping attributes, so that the schema never drifts from the model.
Constants#
| Constant | Value | Description |
|---|---|---|
SCHEMA_ID | 'https://quittio.dev/schema/invoice.schema.json' |
Methods#
| Method | Description |
|---|---|
::defaultPath() | |
->generate() | |
->toJson() |
defaultPath()#
public static function defaultPath(): string- Returns
string
generate()#
public function generate(): array<string, mixed>- Returns
array<string, mixed>
toJson()#
public function toJson(): string- Returns
string