# @sap-ux/annotation-converter

> SAP Fiori OData - Annotation converter

Latest version **0.10.23** (published 2026-10-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @sap-ux/annotation-converter
pnpm add @sap-ux/annotation-converter
yarn add @sap-ux/annotation-converter
bun add @sap-ux/annotation-converter
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.23 |
| Published | 2026-10-09 |
| First published | 2022-03-31 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 266.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 65 |
| Maintainers | tqueck, kranthie.sap, sap_extncrepos, sap-ospo-admin, devinea |

## Links

- npm: https://www.npmjs.com/package/@sap-ux/annotation-converter
- Repository: https://github.com/SAP/open-ux-odata
- Issues: https://github.com/SAP/open-ux-odata/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aannotation-converter
- npm.io page: https://npm.io/package/@sap-ux/annotation-converter

## Dependencies (1)

- [@sap-ux/vocabularies-types](https://npm.io/package/@sap-ux/vocabularies-types.md) 0.16.0

## Recent versions

- 0.10.23 (latest) — 2026-10-09
- 0.10.22 — 2026-07-21
- 0.10.21 — 2026-02-09
- 0.10.20 — 2026-01-27
- 0.10.19 — 2026-01-07
- 0.10.18 — 2025-12-19
- 0.10.17 — 2025-12-18
- 0.10.16 — 2025-12-12
- 0.10.15 — 2025-12-11
- 0.10.14 — 2025-12-11
- 0.10.13 — 2025-12-11
- 0.10.12 — 2025-12-08
- 0.10.11 — 2025-12-08
- 0.10.10 — 2025-12-08
- 0.10.9 — 2025-11-25
- … 84 more at https://npm.io/package/@sap-ux/annotation-converter/versions

## README

# @sap-ux/annotation-converter

Provides a way to convert a raw metadata document object into a convenient structure where path are resolved already for you.

The goal of this module is to provide an object that is ready to use and should cover most of the needs one can have when it comes to manipulating an odata service and its annotation.

All the object defined by this will be compatible with the @sap-ux/vocabularies-types providing an easy way to evaluate annotations.

## Installation
npm
`npm install --save-dev @sap-ux/annotation-converter`

yarn
`yarn add @sap-ux/annotation-converter --dev`

pnpm
`pnpm add @sap-ux/annotation-converter --dev`

## Usage

Import the `convert` method from the module

`import { convert } from '@sap-ux/annotation-converter';`

Use it on a raw metadata generated from `@sap-ux/edmx-parser` or complying to the same structure

```typescript
const myRawMetadata = ... 

const myConvertedMetadata = convert(myRawMetadata);
const isDraftEnabled = myConvertedMetadata.entityTypes[0].annotations.Common?.DraftRoot || myConvertedMetadata.entityTypes[0].annotations.Common?.DraftNode;
const myLabel = myConvertedMetadata.entityTypes[0].properties[0].annotations?.Common?.Text?.$target?.name // Property name of the text annotation if it exists
```

## Keywords
Annotation Converter

---
_Source: https://npm.io/package/@sap-ux/annotation-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
