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

[GET] /api/v1/safes/:safeAddress - Nullable version field #1571

Closed
hectorgomezv opened this issue Jul 17, 2023 · 4 comments
Closed

[GET] /api/v1/safes/:safeAddress - Nullable version field #1571

hectorgomezv opened this issue Jul 17, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@hectorgomezv
Copy link
Member

Describe the bug
When retrieving a Safe info, null version field is returned, even though the OpenAPI definition for this service explicitly indicates SafeInfoResponse.version is not nullable.

To Reproduce
Steps to reproduce the behavior:

  1. GET URL
  2. Returns:
{
  "address": "0xa08826D91a104d31856F448190B346f077e3EABb",
  "nonce": 0,
  "threshold": 1,
  "owners": [
    "0x3955bDB84795fD30522F15A123C68792D3aAAf80"
  ],
  "masterCopy": "0x0000000000000000000000000000000000000000",
  "modules": [
    "0x3955bDB84795fD30522F15A123C68792D3aAAf80"
  ],
  "fallbackHandler": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
  "guard": "0x0000000000000000000000000000000000000000",
  "version": null
}

Expected behavior
version field shouldn't contain null values.

@moisses89
Copy link
Member

@hectorgomezv we are going to change the openapi doc to include nullable version.
Version is going to be null if the masterCopy address is not one of the deterministic known addresses.

@moisses89
Copy link
Member

moisses89 commented Oct 13, 2023

As I can see version is currently nullable on openApi from this commit
Which version of openApi are you using? https://redocly.com/docs/api-reference-docs/specification-extensions/x-nullable/
image

@hectorgomezv
Copy link
Member Author

hectorgomezv commented Oct 13, 2023

Yes, there's a misalignment between the OpenAPI and the inner validation schema. We need to fix the validation schema in the Client Gateway. Thanks for noticing @moisses89

@hectorgomezv
Copy link
Member Author

Closing this, as this behavior is expected. Further changes must be made in the Client Gateway to accept nullable version fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants