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

Value of enumtype members should not be converted from string to int when parsing #30

Open
rroos80 opened this issue Aug 27, 2018 · 1 comment

Comments

@rroos80
Copy link

rroos80 commented Aug 27, 2018

In metadata.py, _parse_enumtype() will go through all members of an enumtype_element and append the name/value pairs to enum['members']. It will convert all string values to int, which causes problems later-on in get_entity_sets() when EnumType is called.

Feel free to correct me on this, but in trying to parse a large OData interface I've come across this issue and it made me wonder why the conversion is taking place in the first case. I've removed the conversion in my local copy for now.

@tpow
Copy link

tpow commented Jan 22, 2019

@rroos80 Can you explain this more or include an example EnumType from the OData interface that was having problems with the conversion?

According to the OData 4 spec, it looks like all EnumTypes have numeric values.

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