diff --git a/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfWsUtils.java b/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfWsUtils.java index b6146b01560bbdd0c7cdb8b6401a11ef75315b34..d6d81b32fd2937548497fc9bd3392c20bb9429b1 100644 --- a/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfWsUtils.java +++ b/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfWsUtils.java @@ -108,7 +108,10 @@ public class NetcdfWsUtils { url = url.endsWith("/swagger") ? url.replace("/swagger", "") : url; return new StringBuilder() - .append("## Service Call Patterns\n") + .append( + "<details>\n" + + "<summary>Service Call Patterns</summary>\n" + ) .append( "### Query Pattern\n" + @@ -139,22 +142,30 @@ public class NetcdfWsUtils { "> Note: To obtain data for all site classes simply " + "call the query or slashed based service with no site class parameter.\n") + .append("</details>") .toString(); } private static String swaggerParameterSection(NetcdfData netcdfData) { return new StringBuilder() - .append("\n## Parameters\n") + .append( + "<details>\n" + + "<summary>Parameters</summary>\n" + ) .append( SwaggerUtils.locationBoundsInfo(netcdfData.minimumBounds(), netcdfData.maximumBounds(), Optional.of("###"))) .append(SwaggerUtils.siteClassInfo(netcdfData.siteClasses(), Optional.of("###"))) + .append("</details>") .toString(); } private static String swaggerScienceBaseSection(ScienceBaseMetadata scienceBaseMetadata) { return new StringBuilder() - .append("## ScienceBase\n") + .append( + "<details>\n" + + "<summary>ScienceBase Information</summary>\n" + ) .append("Data history: " + scienceBaseMetadata.history) .append("<br><br>") .append( @@ -165,6 +176,7 @@ public class NetcdfWsUtils { .append(Arrays.stream(scienceBaseMetadata.scienceBaseInfo) .map(info -> String.format("- [%s](%s)", info.url, info.url)) .collect(Collectors.joining("\n"))) + .append("</details>") .toString(); } }