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

Enum from/to string explicit mappings #1483

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

BeeTwin
Copy link
Contributor

@BeeTwin BeeTwin commented Sep 2, 2024

Enum from/to string explicit mappings

Description

Added support for enum from/to string explicit mappings using MapEnumValueAttribute

Fixes #1476

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Hard-to-understand areas of my code are commented
  • The documentation is updated (as applicable)
  • Unit tests are added/updated
  • Integration tests are added/updated (as applicable, especially if feature/bug depends on roslyn or framework version in use)

@latonz latonz added enhancement New feature or request breaking-change This issue or pull request will break existing consumers labels Sep 6, 2024
@latonz
Copy link
Contributor

latonz commented Sep 6, 2024

Marked as a breaking change as the type of MapEnumValueAttribute.Target changes.

Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution, I added my feedback 😊

@latonz latonz mentioned this pull request Sep 6, 2024
7 tasks
@BeeTwin BeeTwin requested a review from latonz September 7, 2024 08:57
@BeeTwin BeeTwin force-pushed the 1476-strings-in-enum-value-attribute branch 2 times, most recently from 7fb6fe5 to d4fab21 Compare September 7, 2024 21:00
@BeeTwin BeeTwin force-pushed the 1476-strings-in-enum-value-attribute branch from d4fab21 to e49ab78 Compare September 7, 2024 21:05
Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for these fast updates!

@BeeTwin BeeTwin requested a review from latonz September 11, 2024 17:34
@BeeTwin
Copy link
Contributor Author

BeeTwin commented Sep 11, 2024

Sorry for the delay, I was busy with work. Additionally, I still couldn't get the documentation fix to run on my Mac (yarn lint + yarn fix), so the pipeline step might still be failing.

latonz
latonz previously approved these changes Sep 11, 2024
@latonz
Copy link
Contributor

latonz commented Sep 11, 2024

No need to apologise! Thank you for this great contribution 🥳
I have run prettier in the documentation and committed the change. I just ran npm run fix in the docs folder. This project uses npm, not yarn. I don't know if this is the reason it works for me but not for you.

I'm already looking forward to #1486 😊

@latonz latonz merged commit 6a1e415 into riok:main Sep 11, 2024
17 checks passed
@latonz latonz changed the title 1476 strings in enum value attribute Enum from/to string explicit mappings Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This issue or pull request will break existing consumers enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow constant strings with MapEnumValueAttribute when mapping an enum from/to a string.
2 participants