Closed nickkin-msft closed 8 years ago
Sent internal email with the repro zip again, just in case.
Convention model builder will go through all related 'types' starting from the explicitly configured 'types'. So, please make sure 'DeviceType' can be accessed from one of explicitly configured 'types
. Otherwise, you should call AddEnumType
Fluent API to explicitly add the enum type into model.
Yes, that's the bug. The type is referenced indirectly (a->b->c etc.) from the root entity type that is being configured, however when hitting the endpoint it throws the exception because the builder didn't "find" it. Thus I have to add it manually. For the XSD generated classes I'm using, its the enums DeviceType and Architecture (but other indirectly referenced enums are found.)
It’s a bug that we only cover the IEnumerable
PR #582 Merged 8b99db1a012c7931bba3e668f271d8aed61c215c
You can use the same repro zip I sent WRT https://github.com/OData/WebApi/issues/575 to repro this as well. Simply comment out lines 46 and 47 in WebApiConfig.cs:
Then run.
This is non-blocking since I do have the above workaround, and AFAIK is not a regression, so its not high-pri (and thanks again for looking into 575 so quickly!)
Full exception / stack trace (I used a local build that includes the fix for issue 575):
Thanks, Nick