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

Provide option to allow Navigation Properties to be included in the entity swagger models #58

Closed
wbreza opened this issue Jan 20, 2016 · 2 comments

Comments

@wbreza
Copy link

wbreza commented Jan 20, 2016

When the swagger definitions of my API are being generated I'm missing sub objects within the graph. I've tracked it down to the LimitSchemaGraphToTopLevelEntity IDocumentFilter being added by default.

Can you expose a configuration property to enable/disable this?

@ghost ghost added the enhancement label Jan 20, 2016
@bigred8982
Copy link
Contributor

@rbeauchamp would the easiest solution be to just remove the code that automatically adds the document filter?

The LimitSchemaGraphToTopLevelEntity could be changed to public and then added if needed.

GlobalConfiguration.Configuration.EnableSwagger(c =>
{
    c.DocumentFilter<LimitSchemaGraphToTopLevelEntity>();
    c.CustomProvider(defaultProvider => new ODataSwaggerProvider(defaultProvider, c));
})
.EnableSwaggerUi(c => {});

ghost pushed a commit that referenced this issue Feb 11, 2016
@ghost ghost closed this as completed in 59db8c0 Feb 11, 2016
@ghost ghost changed the title Expose option to turn off LimitSchemaGraphToTopLevelEntity Provide option to allow Navigation Properties to be included in the entity swagger models Feb 11, 2016
@rbeauchamp
Copy link
Owner

@wbreza @nealeduncan @bigred8982 This feature is now available in v2.16.0 and described in the documentation. Please give it a try and let me know if you find any issues. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants