From 3b1f4897c4b3f4f3d00305e1d1ee320b2f27ff6b Mon Sep 17 00:00:00 2001 From: Zongqi Chen <137198879+zongqichen@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:43:40 +0200 Subject: [PATCH] udpate custom ord content (#76) --- docs/ord.md | 14 ++++++------ xmpl/ord/custom.ord.json | 28 +----------------------- xmpl/srv/services.cds | 47 ++++++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 55 deletions(-) diff --git a/docs/ord.md b/docs/ord.md index 3ecedd7..510433d 100644 --- a/docs/ord.md +++ b/docs/ord.md @@ -23,14 +23,14 @@ Example: ```js annotate ProcessorService with @ORD.Extensions : { - title : 'This is Processor Service title', - shortDescription: 'short description for Processor Service', - visibility : 'public', - extensible : { - supported : 'no' - } + title : 'This is Processor Service title', + industry : [ + 'Retail', + 'Consumer Products' + ], + lineOfBusiness: ['Sales'], + extensible : {supported: 'no'} }; - ``` Also note that annotations like `@Core.Description` and `@description` are also read. diff --git a/xmpl/ord/custom.ord.json b/xmpl/ord/custom.ord.json index 0b2ac33..7ec683f 100644 --- a/xmpl/ord/custom.ord.json +++ b/xmpl/ord/custom.ord.json @@ -22,7 +22,7 @@ "apiResources": [ { "partOfGroups": null, - "ordId": "sap.sample:apiResource:AdminService:v1", + "ordId": "sap.sample:apiResource:manualImplementedService:v1", "entityTypeMappings": [ { "entityTypeTargets": [ @@ -36,31 +36,5 @@ "supported": "yes" } } - ], - "dataProducts": [ - { - "ordId": "sap.sm:dataProduct:Supplier:v1", - "localId": "Supplier", - "title": "Supplier", - "shortDescription": "Ariba Supplier data product", - "description": "The Supplier data product offers access to all customers.", - "partOfPackage": "sap.sm:package:smDataProducts:v1", - "visibility": "public", - "releaseStatus": "active", - "version": "1.1.11", - "lastUpdate": "2024-06-20T14:04:01+01:00", - "type": "primary", - "category": "business-object", - "outputPorts": [ - { - "ordId": "sap.sm:apiResource:SupplierService:v1" - } - ], - "responsible": "sap:ach:CIC-DP-CO", - "entityTypes": [ - "sap.odm:entityType:BusinessPartner:v1", - "sap.sm:entityType:BusinessPartner:v1" - ] - } ] } \ No newline at end of file diff --git a/xmpl/srv/services.cds b/xmpl/srv/services.cds index ae63476..4e134c3 100644 --- a/xmpl/srv/services.cds +++ b/xmpl/srv/services.cds @@ -1,38 +1,43 @@ -using {ProcessorService,AdminService} from '@capire/incidents/srv/services'; +using { + ProcessorService, + AdminService +} from '@capire/incidents/srv/services'; using from '@capire/incidents/db/schema'; namespace sap.capire.incidents; -annotate ProcessorService with @ORD.Extensions : { +annotate ProcessorService with @ORD.Extensions: { title : 'This is Processor Service title', shortDescription: 'short description for Processor Service', - visibility : 'public', - extensible : { - supported : 'no' - } + visibility : 'public', + extensible : {supported: 'no'} }; -@AsyncAPI.Title : 'SAP Incident Management' -@AsyncAPI.SchemaVersion : '1.0' +@AsyncAPI.Title : 'SAP Incident Management' +@AsyncAPI.SchemaVersion: '1.0' extend service ProcessorService { - event TitleChange : { - ID : Integer; - title : String @title: 'Title'; - } + event TitleChange : { + ID : Integer; + title : String @title: 'Title'; + } } -@AsyncAPI.Title : 'SAP Incident Management' -@AsyncAPI.SchemaVersion : '1.0' +@AsyncAPI.Title : 'SAP Incident Management' +@AsyncAPI.SchemaVersion: '1.0' service LocalService { - event TitleChange2 : { - ID : Integer; - title : String @title: 'Title'; - } + event TitleChange2 : { + ID : Integer; + title : String @title: 'Title'; + } } -annotate AdminService with @ORD.Extensions : { - title : 'This is Admin Service title', - shortDescription : 'short description for Admin Service' +annotate AdminService with @ORD.Extensions: { + title : 'This is Admin Service title', + industry : [ + 'Retail', + 'Consumer Products' + ], + lineOfBusiness: ['Sales'] }; annotate sap.capire.incidents.Customers with @ODM.entityName: 'Customers';