php-json-schema-model-generator
php-json-schema-model-generator copied to clipboard
Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
**Describe the bug** When I use this library to try to generate PHP classes from FedEx's OpenAPI schema for their new RESTful API, I get this error: PHP Fatal error:...
**Describe the bug** Nullable field setters don't correctly account for `null` when generating typehints.  Again, found by PHPStan. **Expected behavior** `setDisableBlockTicking()` should accept `null`. **Schema** ```json { "$schema": "http://json-schema.org/draft-04/schema#",...
**Describe the bug** The following diff: ```diff diff --git a/schema/PluginListYml.json b/schema/PluginListYml.json index 4500662..7d5fdea 100644 --- a/schema/PluginListYml.json +++ b/schema/PluginListYml.json @@ -14,17 +14,13 @@ "description": "The listed plugins will either be allowed...
**Is your feature request related to a problem? Please describe.** Currently, this library relies on uniqid() quite a lot to ensure uniqueness in generated code. This is quite annoying when...
https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.4.4
JSON schema allows us to declare a field as a constant, although that field may be optional and not present in the document, I made support for this feature