Skip to content

[dart-dio] Fixes enum by setting the wireName to the correct value#4708

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
josh-burton:dart-dio-enum-value
Dec 12, 2019
Merged

[dart-dio] Fixes enum by setting the wireName to the correct value#4708
wing328 merged 1 commit intoOpenAPITools:masterfrom
josh-burton:dart-dio-enum-value

Conversation

@josh-burton
Copy link
Contributor

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

CC @ircecho @swipesight @jaumard @nickmeinhold

@nickmeinhold
Copy link
Contributor

I haven't worked on this stuff for a while, when I made a generator that used built_value I vaguely remember having to mess around with using value vs name for the wirename and digging into the java to understand the difference but I've forgotten it all now so I'm not much use here sorry. I'm sure you know what you're doing. I can't finish without saying something about tests. There, said it.

@josh-burton
Copy link
Contributor Author

I'm pretty sure value is the right one to use for the wireName because that's the value present in json. name is a sanitised version of value

In my case the values are returned from the api like Enum_Value and the name ends up being enumValue.

@nickmeinhold
Copy link
Contributor

Ah right, that’s sounding familiar now, thanks for the explanation.

@wing328 wing328 added this to the 4.2.3 milestone Dec 12, 2019
@wing328 wing328 merged commit f784667 into OpenAPITools:master Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants