cebe / yii2-openapi

REST API application generator for Yii2, openapi 3.0 YAML -> Yii2
MIT License
130 stars 23 forks source link

Better way to resolve `allOf` #165

Open SOHELAHMED7 opened 7 months ago

SOHELAHMED7 commented 7 months ago

Though PR https://github.com/SOHELAHMED7/yii2-openapi/pull/30 and https://github.com/SOHELAHMED7/yii2-openapi/pull/14 fixes corresponding issues, we need a more proper way for how allOf is resolved.

This can be part of this lib or cebe/php-openapi.

SOHELAHMED7 commented 7 months ago

More specifically if the property have reference.

Example:

invoice:
          allOf:
            - $ref: '#/components/schemas/Invoice'
            - x-faker: false
            # - nullable: true

user_2:
            allOf:
              - $ref: '#/components/schemas/User'
              - x-fk-on-update: CASCADE
              - x-fk-on-delete: SET NULL