Skip to content

optional tuples breaks codegen #65

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

Closed
pyramation opened this issue Sep 13, 2022 · 4 comments
Closed

optional tuples breaks codegen #65

pyramation opened this issue Sep 13, 2022 · 4 comments

Comments

@pyramation
Copy link
Collaborator

schema https://gist.github.com/pyramation/f6c5cb37a13ed461fd7cbbcf7b13422b

culprit:

              "start_after": {
                "type": [
                  "array",
                  "null"
                ],
                "items": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "string"
                  }
                ],
                "maxItems": 2,
                "minItems": 2
              }
@pyramation
Copy link
Collaborator Author

should be fixed with #66

@grod220
Copy link

grod220 commented Sep 13, 2022

Sadly, the error seems to persist after the version bump: https://github.com/grod220/ts-codegen-example

@pyramation
Copy link
Collaborator Author

pyramation commented Sep 13, 2022

I left one case out — please try now! thanks @grod220

Successfully published:
 - @cosmwasm/[email protected]

@grod220
Copy link

grod220 commented Sep 14, 2022

Sorry, but think I found a follow up issue with the types is generates for this. It generates something like:

import { ArrayOf_SharesResponseItem } from "./AccountNft.types";

export interface AccountNftReadOnlyInterface {
  allDebtShares: () => Promise<ArrayOfSharesResponseItem>;
}

This does not compile because the import has an underscore _ in the name and the type does not.

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

No branches or pull requests

2 participants