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
I have included some HTML content in my endpoint description with the use of docblock. I was trying to replace that with the Endpoint attribute to move the endpoint description to its own file. I had no luck as you could imagine.
The reason behind that is two folds:
I would like to include the same information to multiple endpoints. I want to comply with the DRY principle.
I would like to use some linters on the files to make sure they are properly formatted (not possible at the moment).
Do you think that this could be interesting for the future of scribe?
Hey, can you try writing your custom strategy for this? You could make your custom attribute like this:
#[EndpointFromFile(path: '...')]
And then a strategy to read the specified file. It's quite straightforward if you follow the examples in the repo. For example, the UseResponseAttributes strategy does basically this with the ResponseFromFile attribute.
Scribe version
4.38.0
Your question
I have included some HTML content in my endpoint description with the use of docblock. I was trying to replace that with the
Endpoint
attribute to move the endpoint description to its own file. I had no luck as you could imagine.The reason behind that is two folds:
Do you think that this could be interesting for the future of scribe?
Thank you for your hard work!
Docs
The text was updated successfully, but these errors were encountered: