When populating a SetupOpenAPIOperation function, how can I directly set the underlying o.op operation? #154
Unanswered
luke-hagar-sp
asked this question in
Q&A
Replies: 1 comment
-
|
Hi, I think you can copy your value into the value under the pointer. If // SetupOpenAPIOperation programmatically declares the Operation's OpenAPI schema.
func (o *Operation) SetupOpenAPIOperation(oc openapi.OperationContext) error {
*(oc.(openapi31.OperationExposer).Operation()) = *o.Operation
return nil
} |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm essentially looking to do something like this:
or like this:
The context here is that I am building an entire Operation separately, with specific things like extensions in a builder pattern, and want to simply supply what I've already built rather than remap everything in the walker setup function
Beta Was this translation helpful? Give feedback.
All reactions