From a2aecc3af340753eba2bdb3d1135b441e316c585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Wed, 25 Jan 2023 14:00:42 +0100 Subject: [PATCH] feature/Add glossary items via markdown files 3 --- README.md | 2 +- .../{Run via IntelliJ IDEA.md => Run_via_IntelliJ_IDEA.md} | 0 obp-api/src/main/scala/code/api/util/Glossary.scala | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename docs/glossary/{Run via IntelliJ IDEA.md => Run_via_IntelliJ_IDEA.md} (100%) diff --git a/README.md b/README.md index 4c44c49bd..0dcac1581 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ To compile and run jetty, install Maven 3, create your configuration in obp-api/ mvn install -pl .,obp-commons && mvn jetty:run -pl obp-api -[Note: How to run via IntelliJ IDEA](docs/glossary/Run via IntelliJ IDEA.md) +[Note: How to run via IntelliJ IDEA](docs/glossary/Run_via_IntelliJ_IDEA.md) ## Run some tests. diff --git a/docs/glossary/Run via IntelliJ IDEA.md b/docs/glossary/Run_via_IntelliJ_IDEA.md similarity index 100% rename from docs/glossary/Run via IntelliJ IDEA.md rename to docs/glossary/Run_via_IntelliJ_IDEA.md diff --git a/obp-api/src/main/scala/code/api/util/Glossary.scala b/obp-api/src/main/scala/code/api/util/Glossary.scala index 7322ae42a..840a786f7 100644 --- a/obp-api/src/main/scala/code/api/util/Glossary.scala +++ b/obp-api/src/main/scala/code/api/util/Glossary.scala @@ -3113,8 +3113,8 @@ object Glossary extends MdcLoggable { val source = scala.io.Source.fromFile(path) val lines: String = try source.mkString finally source.close() lines - .replaceAll("PLACEHOLDER_SERVER_URL", getServerUrl) - .replaceAll("PLACEHOLDER_API_ROOT", getObpApiRoot) + .replaceAll("getServerUrl", getServerUrl) + .replaceAll("getObpApiRoot", getObpApiRoot) } private def getListOfFiles():List[File] = { @@ -3135,7 +3135,7 @@ object Glossary extends MdcLoggable { glossaryItems.appendAll( getListOfFiles().map(file => GlossaryItem( - title = file.getName.replace(".md", ""), + title = file.getName.replace(".md", "").replace("_", " "), description = getContentFromMarkdownFile(file.getPath) ) )