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

Single literal type #508

Merged
merged 2 commits into from
Oct 11, 2019
Merged

Single literal type #508

merged 2 commits into from
Oct 11, 2019

Conversation

WoH
Copy link
Collaborator

@WoH WoH commented Oct 8, 2019

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues

Closes #320

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

@dgreene1
Copy link
Collaborator

dgreene1 commented Oct 8, 2019

Do you still want that this to be a v3 thing? I only ask because this PR is targeting master, but you previous comment said you wanted it to be in the v3 branch: #320 (comment)

src/metadataGeneration/tsoa.ts Outdated Show resolved Hide resolved
@WoH
Copy link
Collaborator Author

WoH commented Oct 8, 2019

Do you still want that this to be a v3 thing? I only ask because this PR is targeting master, but you previous comment said you wanted it to be in the v3 branch: #320 (comment)

I am aware, this is the bare minimum, just fix the issue at hand approach. However, this allows me, in combination with aliases, to remove a lot of code for the 3.x branch on top. I'll port this to 3.0 and move from there.

Please keep the type the same as it was because enums can not have boolean as a value type. See this playground which shows that you would get "Computed values are not permitted in an enum with string valued members." if you tried.

This is not relevant here I believe, since we are not talking about ts enums, which should be refEnums, but swagger/openapi enums, which allow booleans. Or am I missing something here?

@dgreene1 dgreene1 merged commit fde6c6d into lukeautry:master Oct 11, 2019
@WoH WoH deleted the literals branch October 12, 2019 13:08
@WoH WoH added the ba label Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single literal type does not work correctly
2 participants