Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/odata-entity-model

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/odata-entity-model

OData model representation without annotations

  • 0.3.0
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

OData Entity Model

Package containing metadata service, which allows to look up elements from entity data model of an OData service.

Installation

Npm npm install --save @sap-ux/odata-entity-model

Yarn yarn add @sap-ux/odata-entity-model

Pnpm pnpm add @sap-ux/odata-entity-model

Usage

  1. Import the needed functions in your modules

    import { MetadataService  } from '@sap-ux/odata-entity-model';
    const metadataFileUri = 'testFileUri';
    const metadataElements: MetadataElement[] = [
        {
            isAnnotatable: true,
            kind: 'EntityType',
            name: 'com.sap.gateway.default.iwbep.tea_busi.v0001.Department',
            path: 'com.sap.gateway.default.iwbep.tea_busi.v0001.Department',
            isCollectionValued: false,
            isComplexType: false,
            isEntityType: true,
            content: [
                {
                    content: [],
                    isAnnotatable: true,
                    kind: 'Property',
                    name: 'Sector',
                    path: 'com.sap.gateway.default.iwbep.tea_busi.v0001.Department/Sector',
                    isCollectionValued: false,
                    isComplexType: false,
                    isEntityType: false,
                    edmPrimitiveType: 'Edm.String'
                }
            ]
        }];
    const metadata = new MetadataService({ ODataVersion: '4.0' });
    metadata.import(metadataElements, metadataFileUri);
    const pathBase = metadata.getMetadataElement('com.sap.gateway.default.iwbep.tea_busi.v0001.Department');
    

For usage examples see unit tests in `odata-entity-model/test`.

FAQs

Package last updated on 05 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc