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

Support enum values #188

Open
diogocravo opened this issue Aug 10, 2017 · 1 comment
Open

Support enum values #188

diogocravo opened this issue Aug 10, 2017 · 1 comment

Comments

@diogocravo
Copy link

I wanted to be able to validate whether a parameter the client is sending matches the enumerated values in the swagger. Unfortunately as of today that validation is only possible if the enum is also a singleton, or am I missing something?

@Ryuno-Ki
Copy link

Hi, @diogocravo!

You would need to patch

typespec.tsType = swaggerType.enum.map(function(str) { return JSON.stringify(str); }).join(' | ');

Ideally it should be easily able to patch each individual value in my opinion …

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