Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

numeric enum not supported #6

Open
vikstrous opened this issue Jun 30, 2017 · 1 comment
Open

numeric enum not supported #6

vikstrous opened this issue Jun 30, 2017 · 1 comment

Comments

@vikstrous
Copy link

Example struct:

type Thing struct {
	Status                 int       `json:"status" enum:"0|1|2|3|4|5|6|7"`
}

The output swagger json has the enum values as a list of strings. Then when you use go-swagger to generate an API client, it panics in an init() function because it's trying to deserialize an array of strings into an array of ints. Long story short, these enum values should serialize into an array of ints instead in this case.

@emicklei
Copy link
Owner

do you have a suggestion to fix this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants