From 78d9aa4bcaf9aaa436076e13a6a9dc36022eb2a1 Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 10 Oct 2024 15:29:50 +0200 Subject: [PATCH] Derived type constraints in Markdown --- lib/csdl2markdown.js | 29 +++++++++++++++--- test/csdl2markdown.test.js | 63 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/lib/csdl2markdown.js b/lib/csdl2markdown.js index a3e08842..0fe1a2d0 100644 --- a/lib/csdl2markdown.js +++ b/lib/csdl2markdown.js @@ -314,7 +314,9 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) { } if (type.$Kind == "TypeDefinition") { - lines.push("**Type:** " + typeLink({ $Type: type.$UnderlyingType })); + lines.push( + "**Type:** " + typeLink({ ...type, $Type: type.$UnderlyingType }), + ); lines.push(""); } @@ -611,7 +613,8 @@ module.exports.csdl2markdown = function (filename, csdl, referenced = {}) { */ function applicableTermsList(applicableTerms) { const text = []; - if (applicableTerms.length > 0) text.push("
Applicable Annotation Terms: