Skip to content

Commit

Permalink
Fix issue in parsing OData core vocabulary (#2779)
Browse files Browse the repository at this point in the history
  • Loading branch information
gathogojr authored Nov 8, 2023
1 parent d210863 commit bf628f7
Show file tree
Hide file tree
Showing 11 changed files with 488 additions and 219 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OData.Community.Keys.V1" Alias="Keys">
<Term AppliesTo="EntityType" Type="Collection(Keys.AlternateKey)" Name="AlternateKeys">
<?xml version="1.0" encoding="utf-8"?>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OData.Community.Keys.V1" Alias="Keys">
<Term AppliesTo="EntityType EntitySet NavigationProperty" Type="Collection(Keys.AlternateKey)" Name="AlternateKeys">
<Annotation Term="Core.Description" String="Communicates available alternate keys"/>
</Term>
<ComplexType Name="AlternateKey">
Expand Down
34 changes: 15 additions & 19 deletions src/Microsoft.OData.Edm/Vocabularies/AuthorizationVocabularies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- OData Measures Vocabulary. Latest version: https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml.
- OData Capabilities Vocabulary. Latest version: https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml.
- OData Validation Vocabulary. Latest version: https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml.
- OData Aggregation Vocabulary. Latest version: https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggretation.V1.xml.
- OData Aggregation Vocabulary. Latest version: https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.xml.
- OData Authorization Vocabulary. Latest version: https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml.
Related work:
Expand Down Expand Up @@ -49,24 +49,21 @@
<Collection>
<Record>
<PropertyValue Property="rel" String="latest-version" />
<PropertyValue Property="href"
String="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml" />
<PropertyValue Property="href" String="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.xml" />
</Record>
<Record>
<PropertyValue Property="rel" String="alternate" />
<PropertyValue Property="href"
String="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.json" />
<PropertyValue Property="href" String="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Authorization.V1.json" />
</Record>
<Record>
<PropertyValue Property="rel" String="describedby" />
<PropertyValue Property="href"
String="https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Authorization.V1.md" />
<PropertyValue Property="href" String="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Authorization.V1.md" />
</Record>
</Collection>
</Annotation>

<Term Name="SecuritySchemes" Type="Collection(Auth.SecurityScheme)" Nullable="false" AppliesTo="EntityContainer">
<Annotation Term="Core.Description" String="At least one of the specified security schemes are required to make a request against the service."/>
<Annotation Term="Core.Description" String="At least one of the specified security schemes are required to make a request against the service" />
</Term>

<ComplexType Name="SecurityScheme">
Expand Down Expand Up @@ -94,9 +91,8 @@

<ComplexType Name="OpenIDConnect" BaseType="Auth.Authorization">
<Property Name="IssuerUrl" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description"
String="Issuer location for the OpenID Provider. Configuration information can be obtained by appending `/.well-known/openid-configuration` to this Url." />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.Description" String="Issuer location for the OpenID Provider. Configuration information can be obtained by appending `/.well-known/openid-configuration` to this Url." />
<Annotation Term="Core.IsURL" />
</Property>
</ComplexType>

Expand All @@ -115,39 +111,39 @@
</Property>
<Property Name="RefreshUrl" Type="Edm.String" Nullable="true">
<Annotation Term="Core.Description" String="Refresh Url" />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.IsURL" />
</Property>
</ComplexType>

<ComplexType Name="OAuth2ClientCredentials" BaseType="Auth.OAuthAuthorization">
<Property Name="TokenUrl" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Token Url" />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.IsURL" />
</Property>
</ComplexType>

<ComplexType Name="OAuth2Implicit" BaseType="Auth.OAuthAuthorization">
<Property Name="AuthorizationUrl" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Authorization URL" />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.IsURL" />
</Property>
</ComplexType>

<ComplexType Name="OAuth2Password" BaseType="Auth.OAuthAuthorization">
<Property Name="TokenUrl" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Token Url" />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.Description" String="Token Url" />
<Annotation Term="Core.IsURL" />
</Property>
</ComplexType>

<ComplexType Name="OAuth2AuthCode" BaseType="Auth.OAuthAuthorization">
<Property Name="AuthorizationUrl" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Authorization URL" />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.IsURL" />
</Property>
<Property Name="TokenUrl" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Token Url" />
<Annotation Term="Core.IsURL" Bool="true"/>
<Annotation Term="Core.IsURL" />
</Property>
</ComplexType>

Expand Down Expand Up @@ -185,7 +181,7 @@
</EnumType>

<TypeDefinition Name="SchemeName" UnderlyingType="Edm.String">
<Annotation Term="Core.Description" String="The name of the authorization scheme." />
<Annotation Term="Core.Description" String="The name of the authorization scheme." />
</TypeDefinition>

</Schema>
Expand Down
Loading

0 comments on commit bf628f7

Please sign in to comment.