Pass custom parameters to mutator #1610
Answered
by
mbwestphal
mbwestphal
asked this question in
Q&A
-
In the mutator function I need more information available to transform the data I receive. Is there a way to pass the definition |
Beta Was this translation helpful? Give feedback.
Answered by
mbwestphal
Oct 25, 2024
Replies: 1 comment 1 reply
-
I have a similar usecase for both mutators and GET API calls, I need to extend the generated API calls to require a
Is there anyway to add custom parameters to the generated API functions. My current orval config is this
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have accomplished this using
jscodeshift
(GitHub).You pass all files to your
jscodeshift
transform (e.g.transform.cjs
) usingorval
safterAllFilesWrite
setting:And in your
transform.cjs
you find the callee ending withMutator
and you add another argument.It is kind of rough, but it works and it is not too much additional source code.