Skip to content

Conversation

lekhmanrus
Copy link
Contributor

  • Enum Descriptions. The code now extracts the description from the System.ComponentModel.Description attribute for each enum value and includes it in the schema under x-enumDescriptions.
  • Backward Compatibility for Enum Names. Supports JSON property names by accepting x-enumNames as well as x-enum-names and x-enum-varnames.
  • Backward Compatibility for Enum Descriptions. Similarly, the schema now accepts both x-enumDescriptions and x-enum-descriptions.

Close #1156

@lekhmanrus lekhmanrus force-pushed the feat/support-description-for-each-x-enum-names-value_ branch 2 times, most recently from 86450b6 to ad2ade4 Compare April 1, 2025 00:02
@lahma
Copy link
Collaborator

lahma commented Jul 27, 2025

Can you rebase and add a test case that shows the change?

@lekhmanrus lekhmanrus force-pushed the feat/support-description-for-each-x-enum-names-value_ branch from ad2ade4 to 4fcde15 Compare July 28, 2025 23:10
- Add test case for enum descriptions with Description attributes
- Add backward compatibility tests for x-enum-names, x-enum-varnames, and x-enum-descriptions
- Fix JSON string assertions to properly check for quoted values
@lekhmanrus
Copy link
Contributor Author

Hi @lahma,
sure, done. 😊

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

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

LGTM, I switched to verify testing for output to get clearer picture of the output. Thank you!

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

Successfully merging this pull request may close these issues.

Is a description for each x-enumNames value supported?
2 participants