Skip to content

Fix for enum naming for camelcased+underscore scenario #194

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

Merged
merged 3 commits into from
Apr 30, 2019

Conversation

MIchaelMainer
Copy link
Contributor

This change only impacts 2 entities in beta. It basically makes the underscoring rule also be applicable to existing underscores. This fix unblocks beta generation for PHP. This fixes PHP#167.

This change fixes the generation scenario where two different member names are similar by having camelcase with preceding underscores like this:

    <Member Name="remoteControlSoftware" Value="25" />
    <Member Name="remote_Control_Software" Value="33" />

The above member names were both being generated as REMOTE_CONTROL_SOFTWARE. This fix differentiates the two as seen in image 1. Image 2 shows the other enum affected by this template change.

Image 1. Change made to WindowsMalwareCategory.php by this change. This is the target that is blocking beta generation
image

Image 2. Change made to DeviceManagementSubscriptions.php by this change.
image

Copy link
Contributor

@irvinesunday irvinesunday left a comment

Choose a reason for hiding this comment

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

LGTM

@MIchaelMainer MIchaelMainer merged commit 4ca1e5b into dev Apr 30, 2019
@MIchaelMainer MIchaelMainer deleted the mm-fixEnumGen branch April 30, 2019 21:44
MIchaelMainer added a commit that referenced this pull request Jun 5, 2019
* Add NamespacePrefix that's used as the class name prefix for generating ObjC models.
* Added preprocessors for nav properties
* Support updating the default base Graph URL via the endpointVersion argument.
* add rule to add containsTarget=true to labelPolicy navigation
* Convert edm.Decimal to number
* Handle CRLF in doc annotations as code comments.
*  Updated request builder interfaces to inherit from common interface
* Added IBaseRequestBuilder to consumers of IRequestBuilder.Base
* Applied <auto-generated/> comment tag to all generated c# files.
* Added comments to all complex types class definitions.
* Fix for enum naming for camelcased+underscore scenario (#194)
* Fix duplicate PHP enum name generation
* Add back camelcase-ization to limit the changes.
* Added preprocess rule for new intune navigation (#195)
* Updating EntityRequest.Base.template with code fix for response headers issue (#202)
* Updating template with response headers fix.
* New changes will propagate the fix for having response headers and status codes in request objects when UpdateAsync method is called in entities
* Adding the exception documentation in IEntityRequest.Base 
* Refactoring in EntityRequest.Base to include this if includeSendParams == true so that it shows in the async UpdateAsync() method.
* Fixed spacing indentation  (#204)
* New changes will propagate the fix for having response headers and status codes in request objects when UpdateAsync method is called in entities
* Adding exception description to documentation
* Adding and refactoring exception documentation
* Adding the exception documentation in IEntityRequest.Base 
* Refactoring in EntityRequest.Base to include this if includeSendParams == true so that it shows in the async UpdateAsync() method.
* Space Indentation Fixes
* Fixed bugs for publishing in definitely typed repo (#203)
* Add contains target for new entities. (#205)
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.

Beta generation blocked by generation based duplicate enum value
3 participants