Skip to content

Commit

Permalink
update to vodml plugin 0.5.8 and display schema in site documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pahjbo committed Oct 21, 2024
1 parent 8a530a3 commit aadd52c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
// this plugin provides all the vo-dml functionality
id("net.ivoa.vo-dml.vodmltools") version "0.5.7"
id("net.ivoa.vo-dml.vodmltools") version "0.5.8"
}

vodml {
Expand Down Expand Up @@ -52,12 +52,22 @@ tasks.register<Copy>("copyJavaDocForSite") {

}


tasks.register<Copy>("copySchemaForSite") {
from(layout.buildDirectory.dir("generated/sources/vodml/schema"))
into(vodml.outputSiteDir.dir("schema"))
dependsOn("vodmlSchema")

}


tasks.register<Exec>("makeSiteNav")
{
commandLine("yq","eval", "(.nav | .. | select(has(\"AutoGenerated Documentation\"))|.[\"AutoGenerated Documentation\"]) += (load(\"doc/site/generated/allnav.yml\")|sort_by(keys|.[0]))", "mkdocs_template.yml")
standardOutput= file("mkdocs.yml").outputStream()
dependsOn("vodmlSite")
dependsOn("copyJavaDocForSite")
dependsOn("copySchemaForSite")

}
tasks.register<Exec>("testSite"){
Expand Down
7 changes: 7 additions & 0 deletions doc/site/schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Schema
======

The schema for the model instance serializations can be found below

* [XML](generated/schema/TemplateDM-v1.vo-dml.xsd){:download=TemplateDM-v1.vo-dml.xsd}
* [JSON](generated/schema/TemplateDM-v1.vo-dml.json){:download=TemplateDM-v1.vo-dml.json}
2 changes: 2 additions & 0 deletions mkdocs_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ theme:
markdown_extensions:
- tables
- footnotes
- attr_list
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
nav:
- Introduction: index.md
- Schema: schema.md
- AutoGenerated Documentation:
- JavaDoc: generated/javadoc

0 comments on commit aadd52c

Please sign in to comment.