Skip to content

Commit

Permalink
fix: patch oneOf -> anyOf for continueWith
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Feb 1, 2024
1 parent 1c3eeb7 commit 1419fbe
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .schema/openapi/patches/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
show_recovery_ui: "#/components/schemas/continueWithRecoveryUi"

- op: add
path: /components/schemas/continueWith/oneOf
path: /components/schemas/continueWith/anyOf
value:
- "$ref": "#/components/schemas/continueWithVerificationUi"
- "$ref": "#/components/schemas/continueWithSetOrySessionToken"
Expand Down
2 changes: 1 addition & 1 deletion .schema/openapi/templates/go/model_anyof.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
{{#-first}}
// use discriminator value to speed up the lookup
var jsonDict map[string]interface{}
err := json.Unmarshal(data, &jsonDict)
err = json.Unmarshal(data, &jsonDict)
if err != nil {
return fmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.")
}
Expand Down
223 changes: 146 additions & 77 deletions internal/client-go/model_continue_with.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1419fbe

Please sign in to comment.