Skip to content

Commit 91981ca

Browse files
committed
Add TOC
1 parent 24315f7 commit 91981ca

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
# php-json-schema-model-generator
99
Creates (immutable) PHP model classes from JSON-Schema files.
1010

11+
## Table of Contents ##
12+
13+
* [Motivation](#Motivation)
14+
* [Requirements](#Requirements)
15+
* [Installation](#Installation)
16+
* [Examples](#Examples)
17+
* [Configuring using the GeneratorConfiguration](#Configuring using the GeneratorConfiguration)
18+
* [How the heck does this work?](#How the heck does this work?)
19+
* [Tests](#Tests)
20+
1121
## Motivation ##
1222

1323
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!

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.2",
15-
"wol-soft/php-micro-template": "^1.3.1",
1614
"symplify/easy-coding-standard": "^6.0.4",
17-
"ext-json": "*",
18-
"wol-soft/php-json-schema-model-generator-exception": "^0.1.0"
15+
"wol-soft/php-json-schema-model-generator-exception": "^0.1.0",
16+
"wol-soft/php-micro-template": "^1.3.1",
17+
"php": ">=7.2",
18+
"ext-json": "*"
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^8.0"

0 commit comments

Comments
 (0)