-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enable Capabilities Vocabulary Configuration #9
Conversation
src/Microsoft.OData.ModelBuilder/Containers/NavigationSourceConfiguration.cs
Outdated
Show resolved
Hide resolved
The attrubute modelbuilder is something we can look at in another task, we need to consider the complex nature of some of the options we could want to be able to configure directly in the attribute... If we can come up with clear rules on these, then auto generation of this should also be possible |
src/Microsoft.OData.ModelBuilder/Vocabularies/VocabularyTermConfiguration.cs
Show resolved
Hide resolved
src/Microsoft.OData.ModelBuilder/Vocabularies/VocabularyTermConfiguration.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.ModelBuilder/Vocabularies/Capabilities/V1/IsolationLevel.cs
Show resolved
Hide resolved
src/Microsoft.OData.ModelBuilder/Vocabularies/Capabilities/V1/ScopeTypeConfiguration.cs
Show resolved
Hide resolved
src/Microsoft.OData.ModelBuilder/Vocabularies/Core/V1/PrimitiveExampleValueConfiguration.cs
Show resolved
Hide resolved
Please file an issue and copy/paste the link into this PR. In reply to: 655538126 [](ancestors = 655538126) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g2mula could you give an example of how to add navigation restrictions? The customers.HasNavigationRestrictions().HasRestrictedProperties(rp =>
rp.HasNavigationProperty(new EdmNavigationPropertyPathExpression(new EntitySetSegment(/* what do I pass here? */)))
.HasReadRestrictions(r =>
r.HasPermissions(p =>
p.HasSchemeName("AuthScheme")
.HasScopes(s => s.HasScope("Customers.ReadByKey").HasRestrictedProperties("*"))))); |
… not overwrite previous configs.
Issues
Adds support for configuring capabilities vocabulary terms target navigation sources and operations
Description
Configurations are auto generated from the referenced vocabulary model in a default EdmModel.
Extension methods have been added to attach configurations to a navigation source or operation.
A fluent api design has been used for setting configuration properties.
Usage
Nested configurations can also be easily added via chaining eg
Checklist (Uncheck if it is not completed)
Additional work
Opened new Task #10 Supporting attributes that can be automatically read by the ConventionModelBuilder.
Opened Docs PR at MicrosoftDocs/OData-docs#141