-
Notifications
You must be signed in to change notification settings - Fork 16
FFM-11164 Re-generate Client and Metrics API code, plus fixes #148
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
Conversation
…pi has been updated" This reverts commit 44722df.
FFM-11164 Re-gen OAPI spec using v2 of oapi-codegen
@@ -769,13 +748,49 @@ func getLogger(options ...ConfigOption) logger.Logger { | |||
return dummyConfig.Logger | |||
} | |||
|
|||
// findErrorInResponse parses an auth response and returns the response error if it exists | |||
func findErrorInResponse(resp *rest.AuthenticateResponse) *rest.Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types have changed here, presumably because of the v2 tool
@@ -196,8 +196,8 @@ func (e Evaluator) evaluateVariationMap(variationsMap []rest.VariationMap, targe | |||
for _, variationMap := range variationsMap { | |||
if variationMap.Targets != nil { | |||
for _, t := range *variationMap.Targets { | |||
if *t.Identifier != "" && *t.Identifier == target.Identifier { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again types have changed. Now a string instead of *String
|
||
require ( | ||
github.com/cenkalti/backoff/v4 v4.2.1 | ||
github.com/deepmap/oapi-codegen v1.11.0 | ||
github.com/getkin/kin-openapi v0.94.0 | ||
github.com/deepmap/oapi-codegen/v2 v2.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2 has pretty significant benefits, mainly around reduced dependency bundle. See https://www.jvt.me/posts/2023/10/23/oapi-codegen-v2-decrease/
What
The OAPI Client and Metrics API code has not been re-generated since 2021. We have a need to integrate new changes for a feature, so this PR re-generates the code using the latest spec.
oapi-codegen
was updated tov2
and I've generated using that, which resulted in some breaking changes with types returned by the auth endpoint, which I've fixed.params
andrequestEditors
Testing
TestGrid
Manual: