Closed ilazaridis closed 3 years ago
You can try https://github.com/swaggest/json-schema-maker (https://github.com/swaggest/json-cli#buildschema).
https://app.quicktype.io this tool also can make schema from JSON sample.
Thanks! I expected that this would be possible once you implement public static function setUpProperties($properties, Schema $ownerSchema)
, to somehow export it out of this. Is this possible ?
Yes, it is also possible to export schema of a class that implements setupProperties
.
$schema = MyClass::schema();
$schemaData = Schema::export($schema);
See test for example.
Awesome, thank you!
That's what I was looking for.
Is there a way to do that out of json sample or in any other way that I couldn't find yet ?
Thanks