Skip to content

Commit

Permalink
name -> qualified name
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Sep 25, 2023
1 parent 175e47f commit 6ea912c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions lib/csdl2markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,9 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) {
/**
* Construct link to documentation of a model element's type in markdown
* @param {string} reference to other model element
* @return {object} custom?, customFile, name
* @return {object} showLink: whether to show a link,
* file: filename,
* name: model element name
*/
function link(ref) {
const np = nameParts(ref);
Expand Down Expand Up @@ -754,7 +756,8 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) {
*/
function getAnnotation(modelElement, term) {
for (const member in modelElement)
if (member.startsWith(term)) return modelElement[member];
if (member === term || member.startsWith(term + "#"))
return modelElement[member];
}

/**
Expand Down
4 changes: 2 additions & 2 deletions vocabularies/Org.OData.Core.V1.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@
"Function"
],
"@Core.Description": "The tagged action or function cannot be invoked, it serves only as an interface",
"@Core.LongDescription": "Services that want to implement the interface define an action or function with the same signature\n or a specialized signature that replaces abstract types like `Edm.EntityType` with concrete types.\n These actions or functions MUST be annotated with [`ImplementsInterface`](#ImplementsInterface)\n and the same qualifier as this annotation."
"@Core.LongDescription": "Services that want to implement the interface define an action or function with the same signature\n or a specialized signature that replaces abstract types like `Edm.EntityType` with concrete types.\n These actions or functions MUST be annotated with the term [`ImplementsInterface`](#ImplementsInterface)\n and the same qualifier as this annotation."
},
"ImplementsInterface": {
"$Kind": "Term",
Expand All @@ -746,7 +746,7 @@
"Property",
"Term"
],
"@Core.Description": "The action or function implements the [interface](#IsInterface) action or function whose name is the annotation value",
"@Core.Description": "The action or function implements the [interface](#IsInterface) action or function whose qualified name is the annotation value",
"@Core.LongDescription": "This term can be applied to actions or functions as well as to properties or terms\n that identify an action or function."
}
}
Expand Down
4 changes: 2 additions & 2 deletions vocabularies/Org.OData.Core.V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Term|Type|Description
[ExplicitOperationBindings](./Org.OData.Core.V1.xml#L527:~:text=<Term%20Name="-,ExplicitOperationBindings,-")|\[[QualifiedBoundOperationName](#QualifiedBoundOperationName)\]|<a name="ExplicitOperationBindings"></a>The qualified names of explicitly bound operations that are supported on the target model element. These operations are in addition to any operations not annotated with RequiresExplicitBinding that are bound to the type of the target model element.
[SymbolicName](./Org.OData.Core.V1.xml#L536:~:text=<Term%20Name="-,SymbolicName,-")|[SimpleIdentifier](#SimpleIdentifier)|<a name="SymbolicName"></a>A symbolic name for a model element
[GeometryFeature](./Org.OData.Core.V1.xml#L545:~:text=<Term%20Name="-,GeometryFeature,-")|[GeometryFeatureType?](#GeometryFeatureType)|<a name="GeometryFeature"></a>A [Feature Object](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) represents a spatially bounded thing
[IsInterface](./Org.OData.Core.V1.xml#L561:~:text=<Term%20Name="-,IsInterface,-")|[Tag](#Tag)|<a name="IsInterface"></a>The tagged action or function cannot be invoked, it serves only as an interface<br>Services that want to implement the interface define an action or function with the same signature or a specialized signature that replaces abstract types like `Edm.EntityType` with concrete types. These actions or functions MUST be annotated with [`ImplementsInterface`](#ImplementsInterface) and the same qualifier as this annotation.
[ImplementsInterface](./Org.OData.Core.V1.xml#L570:~:text=<Term%20Name="-,ImplementsInterface,-")|String|<a name="ImplementsInterface"></a>The action or function implements the [interface](#IsInterface) action or function whose name is the annotation value<br>This term can be applied to actions or functions as well as to properties or terms that identify an action or function.
[IsInterface](./Org.OData.Core.V1.xml#L561:~:text=<Term%20Name="-,IsInterface,-")|[Tag](#Tag)|<a name="IsInterface"></a>The tagged action or function cannot be invoked, it serves only as an interface<br>Services that want to implement the interface define an action or function with the same signature or a specialized signature that replaces abstract types like `Edm.EntityType` with concrete types. These actions or functions MUST be annotated with the term [`ImplementsInterface`](#ImplementsInterface) and the same qualifier as this annotation.
[ImplementsInterface](./Org.OData.Core.V1.xml#L570:~:text=<Term%20Name="-,ImplementsInterface,-")|String|<a name="ImplementsInterface"></a>The action or function implements the [interface](#IsInterface) action or function whose qualified name is the annotation value<br>This term can be applied to actions or functions as well as to properties or terms that identify an action or function.

<a name="RevisionType"></a>
## [RevisionType](./Org.OData.Core.V1.xml#L80:~:text=<ComplexType%20Name="-,RevisionType,-")
Expand Down
4 changes: 2 additions & 2 deletions vocabularies/Org.OData.Core.V1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,12 @@ Any simple identifier | Any type listed in `Validation.OpenPropertyTypeConstrain
<Annotation Term="Core.LongDescription">
<String>Services that want to implement the interface define an action or function with the same signature
or a specialized signature that replaces abstract types like `Edm.EntityType` with concrete types.
These actions or functions MUST be annotated with [`ImplementsInterface`](#ImplementsInterface)
These actions or functions MUST be annotated with the term [`ImplementsInterface`](#ImplementsInterface)
and the same qualifier as this annotation.</String>
</Annotation>
</Term>
<Term Name="ImplementsInterface" Type="Edm.String" Nullable="false" AppliesTo="Action Function Property Term">
<Annotation Term="Core.Description" String="The action or function implements the [interface](#IsInterface) action or function whose name is the annotation value" />
<Annotation Term="Core.Description" String="The action or function implements the [interface](#IsInterface) action or function whose qualified name is the annotation value" />
<Annotation Term="Core.LongDescription">
<String>This term can be applied to actions or functions as well as to properties or terms
that identify an action or function.</String>
Expand Down

0 comments on commit 6ea912c

Please sign in to comment.