From 2a06c1dbbe1b9fc005f45aae51b0290bbce9ee21 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Thu, 29 Apr 2021 12:52:32 -0400 Subject: [PATCH] =?UTF-8?q?Support=20=E2=80=98contributors=E2=80=99=20for?= =?UTF-8?q?=20docs.=20See=20#100.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala | 1 + .../scala/org/monarchinitiative/dosdp/DocsMarkdown.scala | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala b/src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala index b1c149d..f110834 100644 --- a/src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala +++ b/src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala @@ -14,6 +14,7 @@ final case class DOSDP( pattern_name: Option[String] = None, pattern_iri: Option[String] = None, base_IRI: Option[String] = None, + contributors: Option[List[String]] = None, description: Option[String] = None, readable_identifiers: Option[List[String]] = None, classes: Option[Map[String, String]] = None, diff --git a/src/main/scala/org/monarchinitiative/dosdp/DocsMarkdown.scala b/src/main/scala/org/monarchinitiative/dosdp/DocsMarkdown.scala index 7efe2dc..ac92ff7 100644 --- a/src/main/scala/org/monarchinitiative/dosdp/DocsMarkdown.scala +++ b/src/main/scala/org/monarchinitiative/dosdp/DocsMarkdown.scala @@ -25,7 +25,10 @@ object DocsMarkdown { ## Description -${dosdp.description.getOrElse("_No description_")} +${dosdp.description.getOrElse("*No description*")} + +${if (dosdp.contributors.nonEmpty) "## Contributors\n" else ""} +${dosdp.contributors.getOrElse(Nil).map(c => s"- $c").mkString("\n")} ## Variables