php-json-schema-model-generator icon indicating copy to clipboard operation
php-json-schema-model-generator copied to clipboard

Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code

Results 8 php-json-schema-model-generator issues
Sort by recently updated
recently updated
newest added

**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:...

bug

**Describe the bug** Nullable field setters don't correctly account for `null` when generating typehints. ![image](https://user-images.githubusercontent.com/14214667/137391998-27c2e264-5644-4d35-884d-7e71d1ed1baa.png) Again, found by PHPStan. **Expected behavior** `setDisableBlockTicking()` should accept `null`. **Schema** ```json { "$schema": "http://json-schema.org/draft-04/schema#",...

bug

**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...

bug

**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

enhancement

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