From 860ba4cc31ab23c51c278706ece3ff88174282c6 Mon Sep 17 00:00:00 2001 From: Kris West Date: Thu, 4 Jul 2024 15:42:05 +0100 Subject: [PATCH 1/2] Correcting a syntax error in the TransactionResult Schema --- CHANGELOG.md | 1 + schemas/context/transactionresult.schema.json | 10 +++++----- src/context/ContextTypes.ts | 5 +++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d03bddb2..3465b18f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed * Corrected inconsistent camel-casing of the `fdc3.timeRange` context type which appeared as `fdc3.timerange` in a number of places. ([#1240][https://github.com/finos/FDC3/pull/1240]) +* Corrected an error in the `fdc3.TransactionResult` schema which resulted in the `message` property being omitted from the generated TypeScript types for it. ([#1251][https://github.com/finos/FDC3/pull/1251]) ## [FDC3 Standard 2.1](https://github.com/finos/FDC3/compare/v2.0..v2.1) - 2023-09-13 diff --git a/schemas/context/transactionresult.schema.json b/schemas/context/transactionresult.schema.json index 2a8cca61c..4bc0a6ff0 100644 --- a/schemas/context/transactionresult.schema.json +++ b/schemas/context/transactionresult.schema.json @@ -26,13 +26,13 @@ "$ref": "context.schema.json#", "title": "Transaction Result Context", "description": "A context object returned by the transaction, possibly with updated data." + }, + "message": { + "type": "string", + "title": "Transaction Message", + "description": "A human readable message describing the outcome of the transaction." } }, - "message": { - "type": "string", - "title": "Transaction Message", - "description": "A human readable message describing the outcome of the transaction." - }, "required": [ "type", "status" diff --git a/src/context/ContextTypes.ts b/src/context/ContextTypes.ts index b54d4c417..ff5c7a594 100644 --- a/src/context/ContextTypes.ts +++ b/src/context/ContextTypes.ts @@ -1938,6 +1938,10 @@ export interface TransactionResult { * A context object returned by the transaction, possibly with updated data. */ context?: ContextElement; + /** + * A human readable message describing the outcome of the transaction. + */ + message?: string; /** * The status of the transaction being reported. */ @@ -2766,6 +2770,7 @@ const typeMap: any = { ], "any"), "TransactionResult": o([ { json: "context", js: "context", typ: u(undefined, r("ContextElement")) }, + { json: "message", js: "message", typ: u(undefined, "") }, { json: "status", js: "status", typ: r("TransactionStatus") }, { json: "type", js: "type", typ: r("TransactionResultType") }, { json: "id", js: "id", typ: u(undefined, m("any")) }, From fff4b0e97dcd2ace1cfcbc75d2d42961c8a52b6c Mon Sep 17 00:00:00 2001 From: Kris West Date: Thu, 4 Jul 2024 16:36:58 +0100 Subject: [PATCH 2/2] FIxing syntax errors in changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3465b18f7..56ab34252 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,8 +24,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed -* Corrected inconsistent camel-casing of the `fdc3.timeRange` context type which appeared as `fdc3.timerange` in a number of places. ([#1240][https://github.com/finos/FDC3/pull/1240]) -* Corrected an error in the `fdc3.TransactionResult` schema which resulted in the `message` property being omitted from the generated TypeScript types for it. ([#1251][https://github.com/finos/FDC3/pull/1251]) +* Corrected inconsistent camel-casing of the `fdc3.timeRange` context type which appeared as `fdc3.timerange` in a number of places. ([#1240](https://github.com/finos/FDC3/pull/1240)) +* Corrected an error in the `fdc3.TransactionResult` schema which resulted in the `message` property being omitted from the generated TypeScript types for it. ([#1251](https://github.com/finos/FDC3/pull/1251)) ## [FDC3 Standard 2.1](https://github.com/finos/FDC3/compare/v2.0..v2.1) - 2023-09-13