Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interfaces and custom data #37

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

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