Skip to content

Fix OData URL Substitution #384

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 6 commits into from
Oct 26, 2018

Conversation

commonsensesoftware
Copy link
Collaborator

Fixes the parsing and substitution of route prefixes for the OData API Explorer. Also enables the optional inclusion of API version parameters for version-neutral actions (normally excluded).

Fixes #365

@LuukN2
Copy link

LuukN2 commented Oct 26, 2018

This should fix self-references.

However I got an algorithm working that works for both self-referencing types and back-references.
The downside however is that when there is a self-reference or back-reference present you cannot know if the referenced type matches the clrtype yet. This means these types will always be dynamically generated.

It keeps track of the types that couldn't be finished because of properties that still have types being built for them and adds them to a list of properties that have dependencies on those types.

When a type is being built it checks this list for properties that reference it. It adds a property on that type that references the TypeBuilder. If this depletes the list of dependencies for that type the type can be built and is added to the generated types.

I have commited very rough changes on my branch if you want to check them out, I'll rewrite it based on these changes, polish it and open a new pull request later.

I have a lot of time available next week and there's a few more possible edge cases that I'll make repros/pull requests for next week.

@commonsensesoftware
Copy link
Collaborator Author

Sounds good. I appreciate the help. :)

@commonsensesoftware commonsensesoftware merged commit f97406c into master Oct 26, 2018
@commonsensesoftware commonsensesoftware deleted the dev/chrimart/fix-odata-url-substitution branch December 22, 2018 18:45
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.

Asp Net Core + OData + Swagger + Url Segment Versioning
2 participants