SchemaConverter
FinalYes
Methods
- __construct() : mixed
- toFlow() : Schema
- Convert a JSON Schema (https://json-schema.org) document into a Flow Schema.
- toJsonSchema() : array<string, mixed>
- Convert a Flow Schema into a JSON Schema (https://json-schema.org, draft 2020-12) document.
Methods
__construct()
public
__construct([ReferenceResolver|null $resolver = null ]) : mixed
Parameters
- $resolver : ReferenceResolver|null = null
toFlow()
Convert a JSON Schema (https://json-schema.org) document into a Flow Schema.
public
toFlow(array<string, mixed>|Path|string $jsonSchema) : Schema
Parameters
- $jsonSchema : array<string, mixed>|Path|string
-
decoded document, raw JSON document or a path to a schema file
Return values
SchematoJsonSchema()
Convert a Flow Schema into a JSON Schema (https://json-schema.org, draft 2020-12) document.
public
toJsonSchema(Schema $schema) : array<string, mixed>
Parameters
- $schema : Schema