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

The last field in a specs will always be included in the generated code, even when not supposed to #25

Open
lcsmuller opened this issue Oct 18, 2021 · 0 comments

Comments

@lcsmuller
Copy link
Contributor

lcsmuller commented Oct 18, 2021

For example, file field here shouldn't be included in the JSON encoding/decoding functions:

    {
      "title":"Create Guild Sticker",
      "namespace":["create_guild_sticker"],
      "struct":"params",
      "fields":
      [
        {"name":"name", "type":{"base":"char", "dec":"*"}, "comment":"name of the sticker (2-30 characters)"},
        {"name":"description", "type":{"base":"char", "dec":"*"}, "comment":"description of the sticker (empty or 2-100 characters)"},
        {"name":"tags", "type":{"base":"char", "dec":"*"}, "comment":"autocomplete/suggestion tags for the sticker (max 200 characters)"},
        {"name":"file", "type":{ "base":"struct discord_file", "dec":"*" }, "loc":"multipart", "comment":"the sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB"}
      ]
    }

but it will be added nonetheless (and lead to a compilation error), unless its moved from the last position.

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

1 participant