@sap-ux/cds-annotation-parser
Parses annotations out of CDS source, so tooling can read what a model says about its UI without compiling it.
Facts
Where it sits
Who is behind it
In the atlas: maintains 137, wrote 14@SAPmaintainerAndis RedmansContributes to this
In the atlas: contributes to 13@815areAisling NooneContributes to this
In the atlas: contributes to 8@aislingnooneAlina GovoruhinaContributes to this
In the atlas: contributes to 9@AlinaGovoruhinaArtemis CoderContributes to this
In the atlas: contributes to 9@Artemis-Coder17avasilev-sapContributes to this
In the atlas: contributes to 9@avasilev-sapbroksyContributes to this
In the atlas: contributes to 11@broksyChristoph GollmickContributes to this
In the atlas: contributes to 11, wrote 1@cfg74Cian MorrinContributes to this
In the atlas: contributes to 15@cianmSAPCiaraContributes to this
In the atlas: contributes to 8@ciaradaly2021colindoherty1Contributes to this
In the atlas: contributes to 8@colindoherty185 contributors
What it declares
Every artifact
- Type
- Package
- Origin
- By SAP
As a package
- Where it runs
- does not say
- Distributed through
- npm
Connections
Describing a service so a Fiori client renders it without UI code
Download
Install
npm add @sap-ux/cds-annotation-parserDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from SAP/open-ux-tools under Apache-2.0, read@sap-ux/cds-annotation-parser
Installation
Npm
npm install --save @sap-ux/cds-annotation-parser
Yarn
yarn add @sap-ux/cds-annotation-parser
Pnpm
pnpm add @sap-ux/cds-annotation-parser
Usage
Examples of how to use CDS annotation parsing and abstract syntax tree (AST) node search functions.
import { parse, findAnnotationNode, getAstNodes, getNode } from '@sap-ux/cds-annotation-parser';
const ast = parse(`
UI.LineItem #table1 : [
{
$type: 'UI.DataField',
value: some.path,
Label: 'Sample column'
}
]';
`);
if (ast !== undefined) {
// Expected pathToLabel: "/value/items/0/properties/2/value"
const pathToLabel = findAnnotationNode(ast, {
position: { line: 5, character: 15 },
includeDelimiterCharacters: true
});
// An array of nodes matching each segment of the path.
const nodes = getAstNodes(ast, pathToLabel);
const serializedNodes = nodes.map((n) =>
Array.isArray(n) ? '<array of child elements>' : typeof n === 'object' ? `Node of type '${n.type}'` : n
);
/* Expected serializedNodes:
[
"Node of type 'collection'",
"<array of child elements>",
"Node of type 'record'",
"<array of child elements>",
"Node of type 'record-property'",
"Node of type 'string'",
]
*/
const termNode = getNode(ast, '/term');
if (termNode.type === 'path') {
// expected termName: "UI.LineItem"
const termName = termNode.value;
}
const qualifierNode = getNode(ast, '/qualifier');
if (qualifierNode.type === 'qualifier') {
// expected qualifier: "table1"
const qualifier = qualifierNode.value;
}
const propertyValueNode = getNode(ast, '/value/items/0/properties/1/value');
if (propertyValueNode.type === 'path') {
// expected value: "some.path"
const value = propertyValueNode.value;
}
}
Keywords
OData annotations CAP CDS
History
Dependencies 4
Notes
Patch Changes
Workspace Updates
- @sap-ux/text-document-utils 1.0.3 → 1.0.4
- @sap-ux/odata-annotation-core 1.0.3 → 1.0.4
- @sap-ux/odata-entity-model 1.0.1 → 1.0.1
- @sap-ux/odata-vocabularies 1.1.2 → 1.1.3
Fixes 1, Dependencies 4
Notes
Minor Changes
Bug Fixes
- Migration to a new AST format of the CDS flattened annotations [1466bf7]
Patch Changes
Workspace Updates
- @sap-ux/text-document-utils 1.0.2 → 1.0.3
- @sap-ux/odata-annotation-core 1.0.2 → 1.0.3
- @sap-ux/odata-entity-model 1.0.1 → 1.0.1
- @sap-ux/odata-vocabularies 1.1.1 → 1.1.2
Dependencies 4
Notes
Patch Changes
Workspace Updates
- @sap-ux/text-document-utils 1.0.1 → 1.0.2
- @sap-ux/odata-annotation-core 1.0.1 → 1.0.2
- @sap-ux/odata-entity-model 1.0.1 → 1.0.1
- @sap-ux/odata-vocabularies 1.1.0 → 1.1.1
Fixes 2
Notes
Released: 2026-06-03T14:58:37Z
Patch Changes
- 21a3de7: FIX: TypeScript type errors in test files (ESM migration follow-up)
- Updated dependencies [21a3de7]
- @sap-ux/odata-annotation-core@1.0.1
- @sap-ux/text-document-utils@1.0.1
- @sap-ux/odata-entity-model@1.0.1
- @sap-ux/odata-vocabularies@1.0.1
Breaking 1, Fixes 1
Notes
Released: 2026-05-30T20:54:07Z
Major Changes
-
32609a7: # Migration to ECMAScript Modules (ESM)
Packages in the SAP Open UX Tools monorepo have been migrated from CommonJS (CJS) to ECMAScript Modules (ESM) with NodeNext module resolution.
'@sap-ux/backend-proxy-middleware-cf' is experimental and will remain at major version 0. '@sap-ux/generator-odata-downloader' is a top level yeoman generator and will remain as CJS until validation as ESM is done.
What Changed
- Module System: Most packages now use native ESM (
"type": "module"in package.json) - TypeScript Configuration: Updated to
module: "NodeNext"andmoduleResolution: "NodeNext" - Import Statements: All relative imports now include explicit
.jsextensions (per ESM spec) - Build Output: Generated JavaScript files are now ESM modules
- Node.js Requirement: Minimum Node.js version remains >=22.x
Jest Configuration (for Testing)
If your project tests code that imports these packages, update your Jest configuration:
export default { extensionsToTreatAsEsm: ['.ts'], transform: { '^.+\\.ts$': ['ts-jest', { useESM: true }] } };And run Jest with:
NODE_OPTIONS='--experimental-vm-modules' jest - Module System: Most packages now use native ESM (
Patch Changes
- Updated dependencies [32609a7]
- @sap-ux/odata-annotation-core@1.0.0
- @sap-ux/text-document-utils@1.0.0
- @sap-ux/odata-entity-model@1.0.0
- @sap-ux/odata-vocabularies@1.0.0
-
Fixes 3
Notes
Released: 2026-05-20T13:39:22Z
Patch Changes
- @sap-ux/odata-annotation-core@0.3.1
- @sap-ux/odata-entity-model@0.4.0
- @sap-ux/odata-vocabularies@0.5.1
Features 1, Fixes 1
Notes
Released: 2026-05-15T08:12:20Z
Minor Changes
- 72695e5: chore: drop Node 20 support as it is no longer maintained
Patch Changes
- Updated dependencies [72695e5]
- @sap-ux/odata-annotation-core@0.3.0
- @sap-ux/odata-entity-model@0.4.0
- @sap-ux/odata-vocabularies@0.5.0
- @sap-ux/text-document-utils@0.4.0
Fixes 2
Notes
Released: 2026-05-14T11:45:51Z
Patch Changes
- 50a8ba5: chore: fresh release after workflow updates
- Updated dependencies [50a8ba5]
- @sap-ux/odata-annotation-core@0.2.19
- @sap-ux/odata-entity-model@0.3.8
- @sap-ux/odata-vocabularies@0.4.32
- @sap-ux/text-document-utils@0.3.5
Fixes 1
Notes
Released: 2026-04-30T14:23:24Z
Patch Changes
- Updated dependencies [c160401]
- @sap-ux/text-document-utils@0.3.4
- @sap-ux/odata-annotation-core@0.2.18
- @sap-ux/odata-entity-model@0.3.7
- @sap-ux/odata-vocabularies@0.4.31
- Updated dependencies [c160401]
Fixes 1
Notes
Released: 2026-03-30T22:24:11Z
Patch Changes
- Updated dependencies [c53a4ba]
- @sap-ux/odata-vocabularies@0.4.30
- Updated dependencies [c53a4ba]
Fixes 1
Notes
Released: 2026-03-16T17:06:45Z
Patch Changes
- Updated dependencies [dfa433e]
- @sap-ux/odata-entity-model@0.3.7
- @sap-ux/odata-annotation-core@0.2.17
- @sap-ux/odata-vocabularies@0.4.29
- Updated dependencies [dfa433e]
Fixes 1
Notes
Released: 2026-03-11T16:49:00Z
Patch Changes
- Updated dependencies [79e69b9]
- @sap-ux/odata-vocabularies@0.4.28
- Updated dependencies [79e69b9]
Fixes 3
Notes
Released: 2026-03-04T09:03:38Z
Patch Changes
- @sap-ux/odata-annotation-core@0.2.16
- @sap-ux/odata-entity-model@0.3.6
- @sap-ux/odata-vocabularies@0.4.27
Fixes 2
Notes
Released: 2026-02-23T19:07:48Z
Patch Changes
- cc1c422: fix(deps): update dependency npm-run-all2 to v8
- Updated dependencies [cc1c422]
- @sap-ux/odata-annotation-core@0.2.15
- @sap-ux/odata-entity-model@0.3.6
- @sap-ux/odata-vocabularies@0.4.26
Fixes 1
Notes
Released: 2026-02-17T01:38:30Z
Patch Changes
- Updated dependencies [1fa3bb7]
- @sap-ux/odata-vocabularies@0.4.25
- Updated dependencies [1fa3bb7]
Fixes 1
Notes
Released: 2026-02-10T23:50:15Z
Patch Changes
- Updated dependencies [2fc459c]
- @sap-ux/odata-vocabularies@0.4.24
- Updated dependencies [2fc459c]
Fixes 2
Notes
Released: 2026-02-10T21:03:43Z
Patch Changes
- 3795bb2: Add Node.js engine requirement (>=20.x)
- Updated dependencies [3795bb2]
- @sap-ux/odata-annotation-core@0.2.14
- @sap-ux/odata-entity-model@0.3.5
- @sap-ux/odata-vocabularies@0.4.23
Fixes 3
Notes
Released: 2026-01-29T14:02:02Z
Patch Changes
- @sap-ux/odata-annotation-core@0.2.13
- @sap-ux/odata-entity-model@0.3.4
- @sap-ux/odata-vocabularies@0.4.22
Fixes 1
Notes
Released: 2026-01-12T09:10:27Z
Patch Changes
- Updated dependencies [d667a5e]
- @sap-ux/odata-entity-model@0.3.4
- @sap-ux/odata-annotation-core@0.2.12
- Updated dependencies [d667a5e]
Fixes 2
Notes
Released: 2026-01-09T11:35:48Z
Patch Changes
- e111d0d: fix sonar issues
- Updated dependencies [e111d0d]
- @sap-ux/odata-annotation-core@0.2.12
Fixes 1
Notes
Released: 2025-12-18T21:05:02Z
Patch Changes
- Updated dependencies [a9471d0]
- @sap-ux/odata-vocabularies@0.4.21
- Updated dependencies [a9471d0]
Fixes 2
Notes
Released: 2025-12-15T10:50:50Z
Patch Changes
- 4ecfbe2: Chore - upgrade eslint devDependenies, convert to flat config and fix lint issues.
- Updated dependencies [4ecfbe2]
- @sap-ux/odata-annotation-core@0.2.11
- @sap-ux/text-document-utils@0.3.3
- @sap-ux/odata-entity-model@0.3.3
- @sap-ux/odata-vocabularies@0.4.20
Fixes 1
Notes
Released: 2025-12-04T09:20:42Z
Patch Changes
- Updated dependencies [76742fa]
- @sap-ux/odata-vocabularies@0.4.19
- Updated dependencies [76742fa]
Fixes 2
Notes
Released: 2025-11-05T06:53:42Z
Patch Changes
- cfe9c13: Add deep link to package and changelog to README.md
- Updated dependencies [cfe9c13]
- @sap-ux/odata-annotation-core@0.2.10
- @sap-ux/text-document-utils@0.3.2
- @sap-ux/odata-entity-model@0.3.2
- @sap-ux/odata-vocabularies@0.4.18
Fixes 1
Notes
Released: 2025-10-15T11:57:34Z
Patch Changes
- Updated dependencies [ccb5285]
- @sap-ux/odata-vocabularies@0.4.17
- Updated dependencies [ccb5285]
Fixes 2
Notes
Released: 2025-10-06T17:09:01Z
Patch Changes
- 43a2446: chore: fix Sonar issues
- Updated dependencies [43a2446]
- @sap-ux/odata-annotation-core@0.2.9
- @sap-ux/odata-vocabularies@0.4.16
Fixes 3
Notes
Released: 2025-09-23T16:06:33Z
Patch Changes
- @sap-ux/odata-annotation-core@0.2.8
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/odata-vocabularies@0.4.15
Fixes 1
Notes
Released: 2025-09-19T16:36:41Z
Patch Changes
- Updated dependencies [9872384]
- @sap-ux/odata-vocabularies@0.4.14
- Updated dependencies [9872384]
Fixes 3
Notes
Released: 2025-09-16T20:04:56Z
Patch Changes
- @sap-ux/odata-annotation-core@0.2.7
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/odata-vocabularies@0.4.13
Fixes 1
Notes
Released: 2025-08-28T13:37:07Z
Patch Changes
- Updated dependencies [4cfebaf]
- @sap-ux/odata-vocabularies@0.4.12
- Updated dependencies [4cfebaf]
Fixes 1
Notes
Released: 2025-08-13T10:00:10Z
Patch Changes
- Updated dependencies [c7db726]
- @sap-ux/text-document-utils@0.3.1
- @sap-ux/odata-annotation-core@0.2.6
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/odata-vocabularies@0.4.11
- Updated dependencies [c7db726]
Fixes 1
Notes
Released: 2025-06-16T13:15:49Z
Patch Changes
- Updated dependencies [070dcb2]
- @sap-ux/odata-vocabularies@0.4.10
- Updated dependencies [070dcb2]
Fixes 1
Notes
Released: 2025-06-12T12:47:49Z
Patch Changes
- be6febe: fix: parsing of single path in expression
Fixes 3
Notes
Released: 2025-06-10T10:19:01Z
Patch Changes
- @sap-ux/odata-annotation-core@0.2.5
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/odata-vocabularies@0.4.9
Fixes 1
Notes
Released: 2025-05-14T22:35:53Z
Patch Changes
- Updated dependencies [a28357d]
- @sap-ux/text-document-utils@0.3.0
- @sap-ux/odata-annotation-core@0.2.4
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/odata-vocabularies@0.4.8
- Updated dependencies [a28357d]
Fixes 1
Notes
Released: 2025-04-28T07:24:41Z
Patch Changes
- Updated dependencies [2a16531]
- @sap-ux/odata-annotation-core@0.2.3
- Updated dependencies [2a16531]
Fixes 1
Notes
Released: 2025-03-20T17:18:47Z
Patch Changes
- d873cbd: chore - Add repository metadata in package.json
Fixes 1
Notes
Released: 2025-03-10T20:40:35Z
Patch Changes
- Updated dependencies [011c8c5]
- @sap-ux/odata-vocabularies@0.4.7
- Updated dependencies [011c8c5]
Fixes 1
Notes
Released: 2025-02-11T12:08:20Z
Patch Changes
- Updated dependencies [3f273c9]
- @sap-ux/odata-vocabularies@0.4.6
- Updated dependencies [3f273c9]
Fixes 1
Notes
Released: 2025-01-15T13:31:47Z
Patch Changes
- Updated dependencies [54b6d61]
- @sap-ux/odata-vocabularies@0.4.5
- Updated dependencies [54b6d61]
Fixes 1
Notes
Released: 2024-10-22T09:42:10Z
Patch Changes
- Updated dependencies [8af1ba2]
- @sap-ux/odata-vocabularies@0.4.4
- Updated dependencies [8af1ba2]
Fixes 2
Notes
Released: 2024-10-04T15:21:13Z
Patch Changes
- 93f8a83: chore - upgrade typescript 5.6.2
- Updated dependencies [93f8a83]
- @sap-ux/odata-annotation-core@0.2.2
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/odata-vocabularies@0.4.3
Fixes 1
Notes
Released: 2024-08-19T09:48:14Z
Patch Changes
- Updated dependencies [9c8dc5c]
- @sap-ux/odata-vocabularies@0.4.2
- Updated dependencies [9c8dc5c]
Fixes 2
Notes
Released: 2024-08-07T11:06:05Z
Patch Changes
- ac22b7e: feat: new package for text document utility functions and types
- Updated dependencies [ac22b7e]
- @sap-ux/text-document-utils@0.2.0
- @sap-ux/odata-annotation-core@0.2.1
- @sap-ux/odata-entity-model@0.3.0
- @sap-ux/odata-vocabularies@0.4.1
Breaking 1, Features 1, Fixes 1
Notes
Released: 2024-07-05T15:03:05Z
Minor Changes
- c2359077: [BREAKING CHANGE] Change TypeScript transpile target to ES2021 to align with NodeJS 18+
Patch Changes
- Updated dependencies [c2359077]
- @sap-ux/odata-annotation-core@0.2.0
- @sap-ux/odata-entity-model@0.3.0
- @sap-ux/odata-vocabularies@0.4.0
Fixes 1
Notes
Released: 2024-06-20T13:03:49Z
Patch Changes
- Updated dependencies [d09edfd5]
- @sap-ux/odata-vocabularies@0.3.8
- Updated dependencies [d09edfd5]
Fixes 1
Notes
Released: 2024-04-03T09:16:44Z
Patch Changes
- Updated dependencies [95c72dff]
- @sap-ux/odata-vocabularies@0.3.7
- Updated dependencies [95c72dff]
Fixes 2
Notes
Released: 2024-03-22T08:51:54Z
Patch Changes
- 61b46bc8: Security upgrade fixes
- Updated dependencies [61b46bc8]
- @sap-ux/odata-vocabularies@0.3.6
Fixes 1
Notes
Released: 2024-03-14T15:29:35Z
Patch Changes
- Updated dependencies [82c07285]
- @sap-ux/odata-vocabularies@0.3.5
- Updated dependencies [82c07285]
Fixes 2
Notes
Released: 2024-02-07T11:10:48Z
Patch Changes
- eb0b7b37: Chore - TypeScript 5 upgrade
- Updated dependencies [eb0b7b37]
- @sap-ux/odata-annotation-core@0.1.8
- @sap-ux/odata-entity-model@0.2.1
- @sap-ux/odata-vocabularies@0.3.4
Fixes 1
Notes
Released: 2024-01-24T11:05:22Z
Patch Changes
- Updated dependencies [aa8469f3]
- @sap-ux/odata-vocabularies@0.3.3
- Updated dependencies [aa8469f3]
Fixes 1
Notes
Released: 2024-01-19T16:44:06Z
Patch Changes
- Updated dependencies [820ad0dc]
- @sap-ux/odata-vocabularies@0.3.2
- Updated dependencies [820ad0dc]
Fixes 1
Notes
Released: 2024-01-17T11:20:38Z
Patch Changes
- fa99989d: fix(cds-anno-parser): consider ALL potential vocabulary aliases
Fixes 1
Notes
Released: 2024-01-17T08:59:35Z
Patch Changes
- Updated dependencies [2f1f8366]
- @sap-ux/odata-vocabularies@0.3.1
- Updated dependencies [2f1f8366]
Fixes 1
Notes
Released: 2024-01-16T12:59:00Z
Patch Changes
- Updated dependencies [39877d71]
- @sap-ux/odata-vocabularies@0.3.0
- Updated dependencies [39877d71]
Fixes 1
Notes
Released: 2024-01-09T09:27:13Z
Patch Changes
- Updated dependencies [d6151909]
- @sap-ux/odata-entity-model@0.2.0
- @sap-ux/odata-annotation-core@0.1.7
- @sap-ux/odata-vocabularies@0.2.1
- Updated dependencies [d6151909]
Fixes 1
Notes
Released: 2024-03-22T08:51:54Z
Patch Changes
- 20e6a4d8: CDS annotation parser package added to the repo
Others providing
Compare all 15 on the Fiori annotations page →- rap-extrap-extFloorplan classes that read a CDS entity's UI annotations at runtime and render a list report, worklist, tree, object page, overview page, value help or action dialog as an abap2UI5 app.community org, abapFloorplans rendered from CDS UI annotations as abap2UI5 appsfrom ABAP
- com.sap.cds:cds-services-bomcom.sap.cds:cds-services-bomThe Maven bill of materials for CAP Java, pinning every com.sap.cds module in a release, from the API and core runtime to the Spring Boot starters and the CQN engine, to the same version.sap official, capMaven bill of materials pinning CAP Java module versionsfrom CAP
- urp-vocaburp-vocabA CDS vocabulary for User-Rendered Patterns, with @urp.display annotations describing views, card templates, layouts and sections on an entity, consumed by the author's own matching renderer.independent, capCDS vocabulary for User-Rendered Patterns display annotationsfrom CAP
- @mpah/enum-value-help@mpah/enum-value-helpA CAP plugin that generates value help for enum fields from an @enumValueHelp annotation, serving the enum's values from one generated entity instead of hand-written OData annotations.independent, capCAP plugin generating value help for enum fields from an annotationfrom CAP
- @sap/cds-fiori@sap/cds-fioriFiori draft handling and UI-facing behaviour for CAP services.sap official, capFiori draft handling and UI-facing behaviour for CAP servicesfrom CAP
- @sap/cds@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, capCAP Node.js runtimefrom CAP
- @sap/generator-fiori@sap/generator-fioriThe single entry point for generating a Fiori application — the user picks a template and the generator produces the project around it.sap official, capEntry point for generating a Fiori application from a templatefrom CAP
- @sap/ux-cds-compiler-facade@sap/ux-cds-compiler-facadeWraps the CAP CDS compiler behind one set of APIs for annotation handling, so tooling reads a model without tracking which compiler version is installed.sap official, capWrapper around the CDS compiler for annotation handlingfrom CAP
- @sap-ux/cds-odata-annotation-converter@sap-ux/cds-odata-annotation-converterConverts CDS annotations into their OData form, which is the translation Fiori tooling needs to reason about a service the way a client sees it.sap official, capConverter from CDS annotations to their OData formfrom CAP
- @sap/ux-cds-odata-language-server-extension@sap/ux-cds-odata-language-server-extensionAdds the OData annotation features to @sap/vscode-cds, the CDS plug-in for Visual Studio Code: completion, micro-snippets, diagnostics, vocabulary documentation, Go to Definition and an i18n check inside a .cds file.sap official, capOData annotation features for the @sap/vscode-cds extensionfrom CAP
- @sap-ux/fiori-annotation-api@sap-ux/fiori-annotation-apiThe programmatic API Fiori tooling uses to read and write annotations on a project, rather than editing the files as text.sap official, capProgrammatic API for reading and writing project annotationsfrom CAP
- @sap-ux/odata-vocabularies@sap-ux/odata-vocabulariesCarries the OASIS and SAP OData vocabularies as a package, with a VocabularyService for asking which terms exist, where they apply and what their types and properties are.sap official, ui5OASIS and SAP OData vocabularies with a VocabularyServicefrom UI5
- cap-js-geoloc-plugincap-js-geoloc-pluginA CAP plugin for geocoding, address correction and route calculation, driven by three annotations on the model, with the geocoder and router chosen in configuration from providers such as OSRM and Nominatim.independent, capAnnotation-driven geocoding, address correction and routing for CAPfrom CAP
- cap-user-infocap-user-infoResolves the createdBy and modifiedBy of a managed entity to a stored user record of email, given name and family name, and renders the two fields as links with a quickview.independent, capUser details and quickview links for createdBy and modifiedByfrom CAP
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
Show 61 more
History in the atlas
- Typed cds-plugin by placement, which defaults every candidate to that. It is not one.
- Parses annotations out of CDS source, so tooling can read what a model says about its UI without compiling it.
- First seen.
For your agent
- Ref
artifact:sap-ux-cds-annotation-parser- JSON
- /artifacts/sap-ux-cds-annotation-parser.json
- MCP
- Connecting an agent