Skip to content
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

Fix serialization of Nut model #5

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

kirillzh
Copy link
Contributor

A serialization unit test was failing with

Unexpected JSON token at offset 170: Expected start of the array '[', but had '[' instead at path: $.nuts['4'].methods[0]

because response structure is different from the one used by Nut.

Fix by introducing a Method model type as part of a Nul type matching actual json response structure.

Copy link
Owner

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e15cc03, thanks for the fix.

This mint info endpoint needs work to be typesafe, particularly as this Method object is really defined differently for different NUTs, but that's work for future us. Glad to see the tests fixed.

@thunderbiscuit
Copy link
Owner

@kirillzh would you mind rebasing before I merge?

@kirillzh
Copy link
Contributor Author

@kirillzh would you mind rebasing before I merge?

Doesn't look like there are any changes to rebase (tried locally)

A serialization unit test was failing with
```
Unexpected JSON token at offset 170: Expected start of the array '[', but had '[' instead at path: $.nuts['4'].methods[0]
```

because response structure is different from the one used by `Nut`.

Fix by introducing a `Method` model type as part of a `Nul` type matching actual json response structure.
@thunderbiscuit
Copy link
Owner

Yeah sorry I just try to not merge any merge commits, so rebases are required, but if I let GitHub do the rebase through the big green merge/rebase button, I lose the GPG signature on your commit. So either people need to rebase themselves or I do the rebase, but then it adds me as an author to the commit, so I often let people rebase.

@thunderbiscuit thunderbiscuit merged commit 3fbd53d into thunderbiscuit:master Jun 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants