diff --git a/CHANGELOG.md b/CHANGELOG.md index de45ef46..f45a796f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed - Resolving of `impl` for `ProcessService` +- Replace `DecimalFloat` with `Double` for imported processes ## Version 0.2.0 - 2026-04-02 diff --git a/lib/processImport/schemaMapper.ts b/lib/processImport/schemaMapper.ts index 54b92472..e09899a1 100644 --- a/lib/processImport/schemaMapper.ts +++ b/lib/processImport/schemaMapper.ts @@ -61,7 +61,7 @@ function resolvePrimitiveOrRef( case 'boolean': return csn.CdsBuiltinType.Boolean; case 'number': - return csn.CdsBuiltinType.DecimalFloat; + return csn.CdsBuiltinType.Double; case 'integer': return csn.CdsBuiltinType.Integer; default: diff --git a/lib/types/csn-extensions.ts b/lib/types/csn-extensions.ts index 9de4c4ff..8b7e9096 100644 --- a/lib/types/csn-extensions.ts +++ b/lib/types/csn-extensions.ts @@ -22,7 +22,8 @@ export enum CdsBuiltinType { UInt32 = 'cds.UInt32', Integer64 = 'cds.Integer64', Decimal = 'cds.Decimal', - DecimalFloat = 'cds.DecimalFloat', + DecimalFloat = 'cds.Double', + // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values Double = 'cds.Double', Date = 'cds.Date', Time = 'cds.Time', diff --git a/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds b/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds index c11851f6..74b5225f 100644 --- a/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds +++ b/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds @@ -1,4 +1,4 @@ -/* checksum : b2be28c9da2617d511526b2f68e5e6b0 */ +/* checksum : 8a1749afc0e7bf9550b461d58d5f2106 */ namespace eu12.cdsmunich.capprocesspluginhybridtest; /** DO NOT EDIT. THIS IS A GENERATED SERVICE THAT WILL BE OVERRIDDEN ON NEXT IMPORT. */ @@ -33,7 +33,7 @@ service ImportProcess_Attributes_And_OutputsService { type ProcessInputs { stringattribute : String not null; - intattribute : DecimalFloat not null; + intattribute : Double not null; complexe : ProcessInputs_complexe_Array not null; optionalcomplexe : ImportProcess_Complex_DataType; }; diff --git a/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds b/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds index d26fccaf..07e5ffa3 100644 --- a/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds +++ b/tests/bookshop/srv/external/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds @@ -1,4 +1,4 @@ -/* checksum : 7e054e53e107a7f5c8375eb51a454e7f */ +/* checksum : bb9fb1b6c7b7cfb1678dd363f77435ae */ namespace eu12.cdsmunich.capprocesspluginhybridtest; /** DO NOT EDIT. THIS IS A GENERATED SERVICE THAT WILL BE OVERRIDDEN ON NEXT IMPORT. */ @@ -7,7 +7,7 @@ namespace eu12.cdsmunich.capprocesspluginhybridtest; service ImportProcess_Simple_InputsService { type ProcessInputs { string : String not null; - number : DecimalFloat not null; + number : Double not null; _boolean : Boolean not null; date : Date not null; datetime : Timestamp not null; diff --git a/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.json b/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.json index 72264a98..339d47f3 100644 --- a/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.json +++ b/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.json @@ -1,9 +1,10 @@ { "uid": "5edc02ff-ce9a-4aaf-94bb-440b0c981a20", "name": "ImportProcess_Attributes_And_Outputs", - "identifier": "importProcess_Attributes_And_Outputs", + "description": "", "type": "bpi.process", - "projectId": "eu12.cdsmunich.capprocesspluginhybridtest", + "createdAt": "2026-03-18T10:23:31.648909Z", + "updatedAt": "2026-03-18T12:48:22.484258Z", "header": { "inputs": { "title": "inputs", @@ -12,28 +13,23 @@ "definitions": { "date": { "type": "string", - "format": "date", - "title": "date" + "format": "date" }, "dateTime": { "type": "string", - "format": "date-time", - "title": "dateTime" + "format": "date-time" }, "password": { "type": "string", - "password": true, - "title": "password" + "password": true }, "time": { "type": "string", - "format": "time", - "title": "time" + "format": "time" }, "documentFolder": { "type": "string", - "format": "document-folder", - "title": "documentFolder" + "format": "document-folder" } }, "properties": { @@ -54,8 +50,7 @@ "refName": "ImportProcess_Complex_DataType" }, "title": "Complexe", - "description": "", - "refName": "ImportProcess_Complex_DataType" + "description": "" }, "optionalcomplexe": { "$ref": "$.11cbfe86-2e73-4198-868a-d7a2115d82c1", @@ -77,28 +72,23 @@ "definitions": { "date": { "type": "string", - "format": "date", - "title": "date" + "format": "date" }, "dateTime": { "type": "string", - "format": "date-time", - "title": "dateTime" + "format": "date-time" }, "password": { "type": "string", - "password": true, - "title": "password" + "password": true }, "time": { "type": "string", - "format": "time", - "title": "time" + "format": "time" }, "documentFolder": { "type": "string", - "format": "document-folder", - "title": "documentFolder" + "format": "document-folder" } }, "properties": { @@ -125,8 +115,7 @@ "refName": "ImportProcess_Complex_DataType" }, "title": "Complexe", - "description": "", - "refName": "ImportProcess_Complex_DataType" + "description": "" } }, "required": [ @@ -135,6 +124,8 @@ ] }, "processAttributes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "processAttributes", "type": "object", "properties": {}, "required": [] @@ -146,12 +137,17 @@ "type": "both" } ], + "identifier": "importProcess_Attributes_And_Outputs", + "valid": true, + "projectId": "eu12.cdsmunich.capprocesspluginhybridtest", "dataTypes": [ { "uid": "11cbfe86-2e73-4198-868a-d7a2115d82c1", "name": "ImportProcess_Complex_DataType", - "identifier": "ImportProcess_Complex_DataType", + "description": "", "type": "datatype", + "createdAt": "2026-03-18T10:28:54.794097Z", + "updatedAt": "2026-03-18T10:31:37.975015Z", "header": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", @@ -164,13 +160,11 @@ "properties": { "SubString1": { "type": "string", - "uid": "567555b3-ffee-41d4-a650-e9006ca9c5f6", - "title": "SubString1" + "uid": "567555b3-ffee-41d4-a650-e9006ca9c5f6" }, "Substring2": { "type": "string", - "uid": "794440a0-a06e-4fa6-a703-1f8fe4bc9d94", - "title": "Substring2" + "uid": "794440a0-a06e-4fa6-a703-1f8fe4bc9d94" } }, "required": [ @@ -178,8 +172,7 @@ "Substring2" ] }, - "type": "array", - "title": "StringList" + "type": "array" }, "StringType": { "type": "object", @@ -194,27 +187,21 @@ "uid": "f3dd8f45-fcd2-4fe2-9d2f-868e51f52b64", "properties": { "SubSubSubDate": { - "type": "string", - "format": "date", - "title": "SubSubSubDate" + "uid": "361a2e90-c32d-421d-8077-6a412436f031", + "$ref": "#/definitions/date" }, "SubSubSubPassword": { - "type": "string", - "password": true, - "title": "SubSubSubPassword" + "uid": "9901ea3d-4e0f-4421-981e-22fbc0d35cc6", + "$ref": "#/definitions/password" }, "SubSubSubAny": { - "uid": "99fd32c0-7ce9-4c22-bb85-890160827365", - "title": "SubSubSubAny" + "uid": "99fd32c0-7ce9-4c22-bb85-890160827365" } - }, - "title": "SubSubStringType" + } } - }, - "title": "SubStringType" + } } - }, - "title": "StringType" + } } }, "required": [ @@ -223,18 +210,17 @@ "definitions": { "password": { "type": "string", - "password": true, - "title": "password" + "password": true }, "date": { "type": "string", - "format": "date", - "title": "date" + "format": "date" } }, - "version": 1, - "description": "" - } + "version": 1 + }, + "identifier": "importProcess_Complex_DataType", + "valid": true } ] } \ No newline at end of file diff --git a/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Complex_Inputs.json b/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Complex_Inputs.json index 1d011fae..155ebcc8 100644 --- a/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Complex_Inputs.json +++ b/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Complex_Inputs.json @@ -1,9 +1,10 @@ { "uid": "edb7b7fd-8a1c-4c51-a19f-b357aece8428", "name": "ImportProcess_Complex_Inputs", - "identifier": "importProcess_Complex_Inputs", + "description": "", "type": "bpi.process", - "projectId": "eu12.cdsmunich.capprocesspluginhybridtest", + "createdAt": "2026-03-18T10:23:06.672697Z", + "updatedAt": "2026-03-19T11:43:58.132360Z", "header": { "inputs": { "title": "inputs", @@ -12,28 +13,23 @@ "definitions": { "date": { "type": "string", - "format": "date", - "title": "date" + "format": "date" }, "dateTime": { "type": "string", - "format": "date-time", - "title": "dateTime" + "format": "date-time" }, "password": { "type": "string", - "password": true, - "title": "password" + "password": true }, "time": { "type": "string", - "format": "time", - "title": "time" + "format": "time" }, "documentFolder": { "type": "string", - "format": "document-folder", - "title": "documentFolder" + "format": "document-folder" } }, "properties": { @@ -70,6 +66,8 @@ "properties": {} }, "processAttributes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "processAttributes", "type": "object", "properties": {}, "required": [] @@ -81,12 +79,17 @@ "type": "both" } ], + "identifier": "importProcess_Complex_Inputs", + "valid": true, + "projectId": "eu12.cdsmunich.capprocesspluginhybridtest", "dataTypes": [ { "uid": "11cbfe86-2e73-4198-868a-d7a2115d82c1", "name": "ImportProcess_Complex_DataType", - "identifier": "ImportProcess_Complex_DataType", + "description": "", "type": "datatype", + "createdAt": "2026-03-18T10:28:54.794097Z", + "updatedAt": "2026-03-18T10:31:37.975015Z", "header": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", @@ -99,13 +102,11 @@ "properties": { "SubString1": { "type": "string", - "uid": "567555b3-ffee-41d4-a650-e9006ca9c5f6", - "title": "SubString1" + "uid": "567555b3-ffee-41d4-a650-e9006ca9c5f6" }, "Substring2": { "type": "string", - "uid": "794440a0-a06e-4fa6-a703-1f8fe4bc9d94", - "title": "Substring2" + "uid": "794440a0-a06e-4fa6-a703-1f8fe4bc9d94" } }, "required": [ @@ -113,8 +114,7 @@ "Substring2" ] }, - "type": "array", - "title": "StringList" + "type": "array" }, "StringType": { "type": "object", @@ -129,27 +129,21 @@ "uid": "f3dd8f45-fcd2-4fe2-9d2f-868e51f52b64", "properties": { "SubSubSubDate": { - "type": "string", - "format": "date", - "title": "SubSubSubDate" + "uid": "361a2e90-c32d-421d-8077-6a412436f031", + "$ref": "#/definitions/date" }, "SubSubSubPassword": { - "type": "string", - "password": true, - "title": "SubSubSubPassword" + "uid": "9901ea3d-4e0f-4421-981e-22fbc0d35cc6", + "$ref": "#/definitions/password" }, "SubSubSubAny": { - "uid": "99fd32c0-7ce9-4c22-bb85-890160827365", - "title": "SubSubSubAny" + "uid": "99fd32c0-7ce9-4c22-bb85-890160827365" } - }, - "title": "SubSubStringType" + } } - }, - "title": "SubStringType" + } } - }, - "title": "StringType" + } } }, "required": [ @@ -158,18 +152,17 @@ "definitions": { "password": { "type": "string", - "password": true, - "title": "password" + "password": true }, "date": { "type": "string", - "format": "date", - "title": "date" + "format": "date" } }, - "version": 1, - "description": "" - } + "version": 1 + }, + "identifier": "importProcess_Complex_DataType", + "valid": true } ] } \ No newline at end of file diff --git a/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.json b/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.json index 13169e36..19d87987 100644 --- a/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.json +++ b/tests/bookshop/srv/workflows/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.json @@ -1,9 +1,10 @@ { "uid": "0fc541c5-5266-458e-801a-9fe7fbfc32e5", "name": "ImportProcess_Simple_Inputs", - "identifier": "importProcess_Simple_Inputs", + "description": "", "type": "bpi.process", - "projectId": "eu12.cdsmunich.capprocesspluginhybridtest", + "createdAt": "2026-03-18T10:22:42.550371Z", + "updatedAt": "2026-03-18T10:25:09.164955Z", "header": { "inputs": { "title": "inputs", @@ -12,28 +13,23 @@ "definitions": { "date": { "type": "string", - "format": "date", - "title": "date" + "format": "date" }, "dateTime": { "type": "string", - "format": "date-time", - "title": "dateTime" + "format": "date-time" }, "password": { "type": "string", - "password": true, - "title": "password" + "password": true }, "time": { "type": "string", - "format": "time", - "title": "time" + "format": "time" }, "documentFolder": { "type": "string", - "format": "document-folder", - "title": "documentFolder" + "format": "document-folder" } }, "properties": { @@ -53,20 +49,17 @@ "description": "" }, "date": { - "type": "string", - "format": "date", + "$ref": "#/definitions/date", "title": "Date", "description": "" }, "datetime": { - "type": "string", - "format": "date-time", + "$ref": "#/definitions/dateTime", "title": "DateTime", "description": "" }, "documentfolder": { - "type": "string", - "format": "document-folder", + "$ref": "#/definitions/documentFolder", "title": "DocumentFolder", "description": "" } @@ -87,9 +80,14 @@ "properties": {} }, "processAttributes": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "processAttributes", "type": "object", "properties": {}, "required": [] } - } + }, + "identifier": "importProcess_Simple_Inputs", + "valid": true, + "projectId": "eu12.cdsmunich.capprocesspluginhybridtest" } \ No newline at end of file diff --git a/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds b/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds index c11851f6..74b5225f 100644 --- a/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds +++ b/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Attributes_And_Outputs.cds @@ -1,4 +1,4 @@ -/* checksum : b2be28c9da2617d511526b2f68e5e6b0 */ +/* checksum : 8a1749afc0e7bf9550b461d58d5f2106 */ namespace eu12.cdsmunich.capprocesspluginhybridtest; /** DO NOT EDIT. THIS IS A GENERATED SERVICE THAT WILL BE OVERRIDDEN ON NEXT IMPORT. */ @@ -33,7 +33,7 @@ service ImportProcess_Attributes_And_OutputsService { type ProcessInputs { stringattribute : String not null; - intattribute : DecimalFloat not null; + intattribute : Double not null; complexe : ProcessInputs_complexe_Array not null; optionalcomplexe : ImportProcess_Complex_DataType; }; diff --git a/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds b/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds index d26fccaf..07e5ffa3 100644 --- a/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds +++ b/tests/hybrid/importedCDS/eu12.cdsmunich.capprocesspluginhybridtest.importProcess_Simple_Inputs.cds @@ -1,4 +1,4 @@ -/* checksum : 7e054e53e107a7f5c8375eb51a454e7f */ +/* checksum : bb9fb1b6c7b7cfb1678dd363f77435ae */ namespace eu12.cdsmunich.capprocesspluginhybridtest; /** DO NOT EDIT. THIS IS A GENERATED SERVICE THAT WILL BE OVERRIDDEN ON NEXT IMPORT. */ @@ -7,7 +7,7 @@ namespace eu12.cdsmunich.capprocesspluginhybridtest; service ImportProcess_Simple_InputsService { type ProcessInputs { string : String not null; - number : DecimalFloat not null; + number : Double not null; _boolean : Boolean not null; date : Date not null; datetime : Timestamp not null; diff --git a/tests/sample/status-management/srv/external/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.cds b/tests/sample/status-management/srv/external/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.cds index 1c78ad8a..a5d5f45a 100644 --- a/tests/sample/status-management/srv/external/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.cds +++ b/tests/sample/status-management/srv/external/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.cds @@ -1,4 +1,4 @@ -/* checksum : 814a8d2cd20e74f6fa5a984733c3fe07 */ +/* checksum : d52679d62d4637f80905bd3326a8e162 */ namespace eu12.cdsmunich.sampleapplicationproject; /** DO NOT EDIT. THIS IS A GENERATED SERVICE THAT WILL BE OVERRIDDEN ON NEXT IMPORT. */ @@ -14,7 +14,7 @@ service BookApprovalProcessService { booktitle : String; author : Author; description : String; - price : DecimalFloat; + price : Double; entityid : String; }; diff --git a/tests/sample/status-management/workflows/eu12.cdsmunich.sampleapplicationproject.authorVerificationProcess.json b/tests/sample/status-management/srv/workflows/eu12.cdsmunich.sampleapplicationproject.authorVerificationProcess.json similarity index 98% rename from tests/sample/status-management/workflows/eu12.cdsmunich.sampleapplicationproject.authorVerificationProcess.json rename to tests/sample/status-management/srv/workflows/eu12.cdsmunich.sampleapplicationproject.authorVerificationProcess.json index 2ca36be2..effe9ad9 100644 --- a/tests/sample/status-management/workflows/eu12.cdsmunich.sampleapplicationproject.authorVerificationProcess.json +++ b/tests/sample/status-management/srv/workflows/eu12.cdsmunich.sampleapplicationproject.authorVerificationProcess.json @@ -4,7 +4,7 @@ "description": "", "type": "bpi.process", "createdAt": "2026-03-26T08:54:22.179844Z", - "updatedAt": "2026-03-26T11:59:23.987727Z", + "updatedAt": "2026-03-26T15:09:47.783019Z", "header": { "inputs": { "title": "inputs", diff --git a/tests/sample/status-management/workflows/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.json b/tests/sample/status-management/srv/workflows/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.json similarity index 100% rename from tests/sample/status-management/workflows/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.json rename to tests/sample/status-management/srv/workflows/eu12.cdsmunich.sampleapplicationproject.bookApprovalProcess.json