Skip to content

Conversation

FandaOG
Copy link

@FandaOG FandaOG commented Mar 2, 2021

With interfaces and custom data users can make their own factories.
It is possible to make general factory (for example MyGeneralParametersFactory).
This factory get custom data ["class"=>PetsParameter::class].
Then user's factory can do autogenerating schema depending on PetsParameter::class attributes.
User will have only few general factories (Parameter, Response...). Theses factories will get classes with attributes or it could be yaml file with schema definition and will autogenerates
final schema.

@FandaOG
Copy link
Author

FandaOG commented Mar 2, 2021

I've added interfaces because in PHP you can not have multiple class extends but you can have multiple interfaces.

@FandaOG
Copy link
Author

FandaOG commented Mar 2, 2021

There is an extension of this library using this pull request: https://github.com/FandaOG/laravel-openapi-value-object

@FandaOG
Copy link
Author

FandaOG commented Oct 12, 2021

@vyuldashev I've forgot to fix formatting. Could you accept this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants