Add append
and prepend
to scramble.extensions
#692
LeTamanoir
started this conversation in
Ideas
Replies: 2 comments
-
@LeTamanoir that totally makes sense! I'm working on something exactly like this. Will comment here once ready |
Beta Was this translation helpful? Give feedback.
0 replies
-
@LeTamanoir you can now do this in https://scramble.dedoc.co/developers/customize-openapi-documents#operation-transformers |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Scramble is such an awesome library, congrats for all the work that is going into it 🙏
I was facing an "issue" with the
RequestBodyExtension
that was unable to extract the parameters of some requests.Sometimes some of my controller / request logic can rely on custom injected parameters:
But as scramble does not call the controller's
__construct
(which I guess is a good thing 🤔) theMyCustomClass
is not bound to the app and thus the rule can't be resolved.For this to work in scramble I would need to create a custom operation extension that does what is done inside the controller's
__construct
method and it should be executed before the others default extensions:Maybe the
extensions
config could take 2 params:append
andprepend
to inject the middleware accordingly ?Beta Was this translation helpful? Give feedback.
All reactions