You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -319,6 +319,23 @@ Provide custom database table column name in case of relationship column. This w
319
319
- x-fk-column-name: redelivery_of # this will create `redelivery_of` column instead of `redelivery_of_id`
320
320
```
321
321
322
+
323
+
### `x-deleted-schemas`
324
+
325
+
This is root level key used to generate "drop table" migration for the deleted component schema. If a component schema (DB model) is removed from OpenAPI spec then its following entities should be also deleted from the code:
326
+
327
+
- DB table (migrations)
328
+
- model
329
+
- faker
330
+
331
+
So to generate appropriate migration for the removed schema, explicitly setting schema name or schema name + custom table name is required in this key. Only then the migrations will be generated. It should be set as:
332
+
333
+
```yaml
334
+
x-deleted-schemas:
335
+
- Fruit # Example: table name is evaluated to `itt_fruits`, if `itt_` is prefix set in DB config
336
+
- Mango: the_mango_table_name # custom table name; see `x-table` in README.md
337
+
```
338
+
322
339
### `x-no-relation`
323
340
324
341
To differentiate a component schema property from one-to-many or many-to-many relation in favour of array(json) of
@@ -443,7 +460,7 @@ paths:
443
460
Generated URL rules config for above is (in `urls.rest.php` or pertinent file):
444
461
```php
445
462
'GET a1/b1' => 'abc/xyz',
446
-
'POST a1/b1' => 'abc/xyz',
463
+
'POST a1/b1' => 'abc/xyz',
447
464
'a1/b1' => 'abc/options',
448
465
```
449
466
`x-route`does not support [Yii Modules](https://www.yiiframework.com/doc/guide/2.0/en/structure-modules).
0 commit comments