Skip to content

Commit

Permalink
Proposal for a Common.ValidationFunction on parameters and action
Browse files Browse the repository at this point in the history
  • Loading branch information
nlunets committed Feb 24, 2023
1 parent aceec18 commit 50ac28e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vocabularies/Common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,14 @@
"@Common.Experimental": true,
"@Core.IsURL": true,
"@Core.Description": "Base URL for WebSocket connections"
},
"ValidationFunction": {
"$Kind": "Term",
"$Type": "Common.QualifiedName",
"$AppliesTo": ["Parameter", "Action", "Function"],
"@Common.Experimental": true,
"@Core.Description": "Function that validates whether the parameter value, or parameter values (in case of Action and Function) is correct or not",
"@Core.LongDescription": "The qualified name of an unbound function that validates whether the parameter value, or parameter values (in case of Action and Function) is correct or not."
}
}
}
1 change: 1 addition & 0 deletions vocabularies/Common.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Term|Type|Description
[mediaUploadLink](./Common.xml#L1402:~:text=<Term%20Name="-,mediaUploadLink,-") *([Experimental](Common.md#Experimental))*|URL|<a name="mediaUploadLink"></a>URL for uploading new media content to a Document Management Service<br>In contrast to the `@odata.mediaEditLink` this URL allows to upload new media content without directly changing a stream property or media resource. The upload request typically uses HTTP POST with `Content-Type: multipart/form-data` following RFC 7578. The upload request must contain one multipart representing the content of the file. The `name` parameter in the `Content-Disposition` header (as described in RFC 7578) is irrelevant, but the `filename` parameter is expected. If the request succeeds the response will contain a JSON body of `Content-Type: application/json` with a JSON property `readLink`. The newly uploaded media resource can be linked to the stream property by changing the `@odata.mediaReadLink` to the value of this `readLink` in a subsequent PATCH request to the OData entity.
[PrimitivePropertyPath](./Common.xml#L1417:~:text=<Term%20Name="-,PrimitivePropertyPath,-") *([Experimental](Common.md#Experimental))*|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Tag)|<a name="PrimitivePropertyPath"></a>A term or term property with this tag whose type is (a collection of) `Edm.PropertyPath` MUST resolve to a primitive structural property
[WebSocketBaseURL](./Common.xml#L1422:~:text=<Term%20Name="-,WebSocketBaseURL,-") *([Experimental](Common.md#Experimental))*|URL|<a name="WebSocketBaseURL"></a>Base URL for WebSocket connections
[ValidationFunction](./Common.xml#L1428:~:text=<Term%20Name="-,ValidationFunction,-") *([Experimental](Common.md#Experimental))*|[QualifiedName](#QualifiedName)|<a name="ValidationFunction"></a>Function that validates whether the parameter value, or parameter values (in case of Action and Function) is correct or not<br>The qualified name of an unbound function that validates whether the parameter value, or parameter values (in case of Action and Function) is correct or not.

<a name="TextFormatType"></a>
## [TextFormatType](./Common.xml#L111:~:text=<EnumType%20Name="-,TextFormatType,-")
Expand Down
8 changes: 8 additions & 0 deletions vocabularies/Common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,14 @@ If the request succeeds the response will contain a JSON body of `Content-Type:
<Annotation Term="Core.Description" String="Base URL for WebSocket connections" />
</Term>

<Term Name="ValidationFunction" Type="Common.QualifiedName" Nullable="false" AppliesTo="Parameter Action Function">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Function that validates whether the parameter value, or parameter values (in case of Action and Function) is correct or not" />
<Annotation Term="Core.LongDescription">
<String>The qualified name of an unbound function that validates whether the parameter value, or parameter values (in case of Action and Function) is correct or not.</String>
</Annotation>
</Term>

</Schema>
</edmx:DataServices>
</edmx:Edmx>

0 comments on commit 50ac28e

Please sign in to comment.