Skip to content

Remove uniqueItems: true from spec? #112

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

Open
achingbrain opened this issue Oct 5, 2024 · 1 comment
Open

Remove uniqueItems: true from spec? #112

achingbrain opened this issue Oct 5, 2024 · 1 comment

Comments

@achingbrain
Copy link
Member

The OpenAPI yaml has uniqueItems: true in several places where lists of things are accepted/returned.

I don't know if it's too late in the day for this spec, but this field causes the TypeScript generator to use Sets for everything which it then can't serialize/deserialize properly because they have no JSON representation.

Can we remove this field? It breaks code generation and if it's important, it could be in a validation layer instead of the serialisation layer.

@lidel
Copy link
Member

lidel commented Dec 21, 2024

@achingbrain apologies for missing this.

Yes, as long we relax API, should be fine to do this, especially if it makes code generation easier for new users. Old ones probably will never re-generate, as this spec is kinda in purgatory – good enough for ipfs-desktop, but not useful beyond that, and adoption is a mixed bag.

If still relevant, submit a PR – to accept it + tag a patch release.

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