{"repo":"wol-soft/php-json-schema-model-generator","free":true,"listed":false,"github":"https://github.com/wol-soft/php-json-schema-model-generator","clone":"git clone https://github.com/wol-soft/php-json-schema-model-generator.git","description":"Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code","language":"PHP","stars":82,"topics":["json-schema","jsonapi","code-generator","code-generation","model","immutable-objects","immutable","middleware","schema-model","php-model"],"license":"MIT","category":"dev-tools","readme_excerpt":"php-json-schema-model-generator Generates PHP model classes from JSON-Schema files including validation and providing a fluent auto completion for the generated classes. Table of Contents ## Motivation Requirements Installation Basic usage Configuring using the GeneratorConfiguration Examples How the heck does this work? Tests Docs Motivation ## Simple example from a PHP application: you define and document an API with swagger annotations and JSON-Schema models. Now you want to use models in your controller actions instead of manually accessing the request data (eg. array stuff). Additionally your schema already defines the validation rules for the models. Why duplicate this rules into your manually written code? Instead you can set up a middleware which instantiates models generated with this library and feed the model with the request data. Now you have a validated model which you can use in your controller action. With full auto completion when working with nested objects. Yay! Requirements ## - Requires at least PHP 8.4 - Requires the PHP extension ext-mbstring Installation ## The recommended way to install php-json-schema-model-generator is through Composer: To avoid adding all dependencies of the php-json-schema-model-generator to your production dependencies it's recommended to add the library as a dev-dependency and include the wol-soft/php-json-schema-model-generator-production library. The production library provides all classes to run the generated code. Generating","default_branch":null,"files":null,"tree":[],"storefront":"/r/wol-soft","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wol-soft/php-json-schema-model-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}