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

Fix: allow some UI annotations on type definitions #242

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions vocabularies/UI.json
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
"$Kind": "Term",
"$Collection": true,
"$Type": "UI.CriticalityLabelType",
"$AppliesTo": ["Property", "EntityType"],
"$AppliesTo": ["Property", "EntityType", "TypeDefinition"],
"@Common.Experimental": true,
"@Core.Description": "\n Assign labels to criticalities. This information can be used for semantic coloring.\n When applied to a property, a label for a criticality must be provided, if more than one value of the annotated property has been assigned to the same criticality.\n There must be no more than one label per criticality.\n "
},
Expand Down Expand Up @@ -1193,7 +1193,7 @@
"$Kind": "Term",
"$Type": "Core.Tag",
"$DefaultValue": true,
"$AppliesTo": ["Property", "Term"],
"$AppliesTo": ["Property", "Term", "TypeDefinition"],
"@Core.Description": "Properties and terms annotated with this term MUST contain a valid URL referencing an resource with a MIME type image",
"@Core.RequiresType": "Edm.String",
"@Validation.ApplicableTerms": ["Common.IsNaturalPerson"]
Expand All @@ -1202,7 +1202,7 @@
"$Kind": "Term",
"$Type": "Core.Tag",
"$DefaultValue": true,
"$AppliesTo": ["Property", "EntityType"],
"$AppliesTo": ["Property", "EntityType", "TypeDefinition"],
"@Common.Experimental": true,
"@Core.Description": "Properties annotated with this term MUST be a stream property annotated with a MIME type image. Entity types annotated with this term MUST be a media entity type annotated with a MIME type image.",
"@Core.RequiresType": "Edm.Stream",
Expand All @@ -1212,13 +1212,13 @@
"$Kind": "Term",
"$Type": "Core.Tag",
"$DefaultValue": true,
"$AppliesTo": ["Property", "PropertyValue", "Parameter"],
"$AppliesTo": ["Property", "PropertyValue", "Parameter", "TypeDefinition"],
"@Core.Description": "Properties and parameters annotated with this annotation should be rendered as multi-line text (e.g. text area)",
"@Core.RequiresType": "Edm.String"
},
"Placeholder": {
"$Kind": "Term",
"$AppliesTo": ["Property"],
"$AppliesTo": ["Property", "TypeDefinition"],
"@Common.Experimental": true,
"@Core.Description": "A short, human-readable text that gives a hint or an example to help the user with data entry",
"@Core.IsLanguageDependent": true
Expand Down Expand Up @@ -1594,7 +1594,7 @@
"RecommendationList": {
"$Kind": "Term",
"$Type": "UI.RecommendationListType",
"$AppliesTo": ["Property", "Parameter"],
"$AppliesTo": ["Property", "Parameter", "TypeDefinition"],
"@Core.Description": "Specifies how to get a list of recommended values for a property or parameter",
"@Core.LongDescription": "Intelligent systems can help users by recommending input the user may \"prefer\"."
},
Expand Down Expand Up @@ -1632,7 +1632,7 @@
"DoNotCheckScaleOfMeasuredQuantity": {
"$Kind": "Term",
"$Type": "Edm.Boolean",
"$AppliesTo": ["Property"],
"$AppliesTo": ["Property", "TypeDefinition"],
"@Common.Experimental": true,
"@Core.Description": "Do not check the number of fractional digits of the annotated measured quantity",
"@Core.LongDescription": "The annotated property contains a measured quantity, and the user may enter more fractional digits than defined for the corresponding unit of measure.\n\nThis switches off the validation of user input with respect to decimals."
Expand Down
14 changes: 7 additions & 7 deletions vocabularies/UI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ The trend is
<Property Name="Criticality" Type="UI.CriticalityType" />
</ComplexType>

<Term Name="CriticalityLabels" Type="Collection(UI.CriticalityLabelType)" Nullable="false" AppliesTo="Property EntityType">
<Term Name="CriticalityLabels" Type="Collection(UI.CriticalityLabelType)" Nullable="false" AppliesTo="Property EntityType TypeDefinition">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description">
<String>
Expand Down Expand Up @@ -1338,7 +1338,7 @@ The trend is
<Annotation Term="Core.RequiresType" String="UI.ReferenceFacet" />
</Term>

<Term Name="IsImageURL" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Property Term">
<Term Name="IsImageURL" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Property Term TypeDefinition">
<Annotation Term="Core.Description" String="Properties and terms annotated with this term MUST contain a valid URL referencing an resource with a MIME type image" />
<Annotation Term="Core.RequiresType" String="Edm.String" />
<Annotation Term="Validation.ApplicableTerms">
Expand All @@ -1348,7 +1348,7 @@ The trend is
</Annotation>
</Term>

<Term Name="IsImage" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Property EntityType">
<Term Name="IsImage" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Property EntityType TypeDefinition">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Properties annotated with this term MUST be a stream property annotated with a MIME type image. Entity types annotated with this term MUST be a media entity type annotated with a MIME type image." />
<Annotation Term="Core.RequiresType" String="Edm.Stream" />
Expand All @@ -1359,12 +1359,12 @@ The trend is
</Annotation>
</Term>

<Term Name="MultiLineText" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Property PropertyValue Parameter">
<Term Name="MultiLineText" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Property PropertyValue Parameter TypeDefinition">
<Annotation Term="Core.Description" String="Properties and parameters annotated with this annotation should be rendered as multi-line text (e.g. text area)" />
<Annotation Term="Core.RequiresType" String="Edm.String" />
</Term>

<Term Name="Placeholder" Type="Edm.String" Nullable="false" AppliesTo="Property">
<Term Name="Placeholder" Type="Edm.String" Nullable="false" AppliesTo="Property TypeDefinition">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="A short, human-readable text that gives a hint or an example to help the user with data entry" />
<Annotation Term="Core.IsLanguageDependent" />
Expand Down Expand Up @@ -1728,7 +1728,7 @@ This is in contrast to [DataFieldForIntentBasedNavigation](#DataFieldForIntentBa
</Annotation>
</TypeDefinition>

<Term Name="RecommendationList" Type="UI.RecommendationListType" Nullable="false" AppliesTo="Property Parameter">
<Term Name="RecommendationList" Type="UI.RecommendationListType" Nullable="false" AppliesTo="Property Parameter TypeDefinition">
<Annotation Term="Core.Description" String="Specifies how to get a list of recommended values for a property or parameter" />
<Annotation Term="Core.LongDescription">
<String>Intelligent systems can help users by recommending input the user may "prefer".</String>
Expand Down Expand Up @@ -1764,7 +1764,7 @@ This is in contrast to [DataFieldForIntentBasedNavigation](#DataFieldForIntentBa
<Annotation Term="Core.Description" String="The contents of this property must not be propagated to the app-to-app navigation context" />
</Term>

<Term Name="DoNotCheckScaleOfMeasuredQuantity" Type="Edm.Boolean" Nullable="false" AppliesTo="Property">
<Term Name="DoNotCheckScaleOfMeasuredQuantity" Type="Edm.Boolean" Nullable="false" AppliesTo="Property TypeDefinition">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Do not check the number of fractional digits of the annotated measured quantity" />
<Annotation Term="Core.LongDescription">
Expand Down