File tree 1 file changed +54
-0
lines changed 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,60 @@ Generated URL rules config for above is (in `urls.rest.php` or pertinent file):
465
465
` ` `
466
466
` x-route` does not support [Yii Modules](https://www.yiiframework.com/doc/guide/2.0/en/structure-modules).
467
467
468
+ # ## `x-description-is-comment`
469
+
470
+ boolean; default : false
471
+
472
+ When a new database table is created from new OpenAPI component schema, description of a property will be used as
473
+ comment of column (of database table).
474
+
475
+ This extension is used when a description is edited for existing property, and you want to generate migration for its
476
+ corresponding column comment changes.
477
+
478
+ This extension can be used at 3 place :
479
+
480
+ **1. root level (highest priority)**
481
+
482
+ ` ` ` yaml
483
+ openapi: 3.0.3
484
+ x-description-is-comment: true
485
+ info:
486
+ title: Description
487
+ ` ` `
488
+
489
+ This will create migration of any changed description of component schema property present throughout the spec.
490
+
491
+ **2. component schema level**
492
+
493
+ ` ` ` yaml
494
+ components:
495
+ schemas:
496
+ Fruit:
497
+ type: object
498
+ x-description-is-comment: true
499
+ ` ` `
500
+
501
+ This will create migration of changed description of only properties of component schema which have this extension.
502
+
503
+ **3. property level (lowest priority)**
504
+
505
+ ` ` ` yaml
506
+ components:
507
+ schemas:
508
+ Fruit:
509
+ type: object
510
+ properties:
511
+ id:
512
+ type: integer
513
+ name:
514
+ type: string
515
+ nullable: false
516
+ x-description-is-comment: true
517
+ description: Hi there
518
+ ` ` `
519
+
520
+ Migrations will be only generated for changed description of properties having this extension.
521
+
468
522
# # Many-to-Many relation definition
469
523
470
524
There are two ways for define many-to-many relations :
You can’t perform that action at this time.
0 commit comments