Skip to content

Commit

Permalink
Baseline reference documentation for latest, develop, 1.0.0, and 1.0.…
Browse files Browse the repository at this point in the history
…0-rc2.
  • Loading branch information
david-waltermire committed Jun 8, 2021
1 parent 9dc6bd4 commit 85e7d01
Show file tree
Hide file tree
Showing 246 changed files with 1,649,168 additions and 16,013 deletions.
27 changes: 18 additions & 9 deletions build/ci-cd/generate-model-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ json_reference_filename="json-reference.md"
json_index_filename="json-index.md"
json_definitions_filename="json-definitions.md"
doc_path_base="/docs/content/reference/"
BRANCH="$(git branch --show-current)"
BRANCH=""
DISABLE_ARCHETYPE_CREATION=false
OSCAL_DIR="${OSCALDIR}"
WORKING_DIR="${OSCALDIR}"
Expand Down Expand Up @@ -131,13 +131,21 @@ if [ "$#" -ne 0 ]; then
fi

# generate reference documentation
DOCS_DIR="${OSCAL_DIR}/docs";
DOCS_DIR="${WORKING_DIR}/docs";
if [ -z "$BRANCH" ]; then
BRANCH="$(cd "${OSCAL_DIR}";git symbolic-ref -q --short HEAD || git describe --tags --exact-match)"
fi

echo "BRANCH(initial)='${BRANCH}'"
echo "OSCAL_DIR(initial)='${OSCAL_DIR}'"

if [[ "$BRANCH" =~ ^v.* ]]; then
VERSION="${BRANCH/#"v"}"
REVISION="${VERSION}"
TYPE="tag"
elif [ "$BRANCH" = "main" ]; then
VERSION="$(git describe --abbrev=0)"
VERSION="$(cd "${OSCAL_DIR}";git describe --abbrev=0)"
VERSION="${VERSION/#"v"}"
REVISION="latest"
TYPE="branch"
elif [ "$BRANCH" = "develop" ]; then
Expand All @@ -153,17 +161,18 @@ fi

doc_path="${WORKING_DIR}${doc_path_base}${REVISION}"

#echo "BRANCH='${BRANCH}'"
#echo "VERSION='${VERSION}'"
#echo "REVISION='${REVISION}'"
#echo "TYPE='${TYPE}'"
echo "BRANCH='${BRANCH}'"
echo "VERSION='${VERSION}'"
echo "REVISION='${REVISION}'"
echo "TYPE='${TYPE}'"
#echo "doc_path='${doc_path}'"

# build the version folder
if [ ! -d "${doc_path}" ] || [ "$DISABLE_ARCHETYPE_CREATION" = "false" ]; then
[ -d "${doc_path}" ] && rm -rf "${doc_path}"
rm -rf "${doc_path}"
#mkdir -p "${doc_path}"

result=$(cd ${DOCS_DIR};HUGO_REF_TYPE="${TYPE}" HUGO_REF_BRANCH="${BRANCH}" HUGO_REF_VERSION="${VERSION}" HUGO_REF_REVISION="${REVISION}" hugo new --config "${OSCAL_DIR}/docs/config.yaml" --kind reference "${doc_path}" 2>&1)
result=$(cd ${DOCS_DIR};HUGO_REF_TYPE="${TYPE}" HUGO_REF_BRANCH="${BRANCH}" HUGO_REF_VERSION="${VERSION}" HUGO_REF_REVISION="${REVISION}" hugo new --kind reference-index "${doc_path}/_index.md" 2>&1)
cmd_exitcode=$?
if [ $cmd_exitcode -ne 0 ]; then
echo -e "${P_ERROR}Generating index page failed for revision '${P_END}${REVISION}${P_ERROR}' on branch '${P_END}${BRANCH}${P_ERROR}'.${P_END}"
Expand Down
3 changes: 2 additions & 1 deletion docs/archetypes/complete-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ weight: 20
suppresstopiclist: true
sidenav:
title: All Models
activerenderdepth: 2
focusrenderdepth: 2
activerenderdepth: -1
inactiverenderdepth: 1
---

Expand Down
3 changes: 2 additions & 1 deletion docs/archetypes/model-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ weight: 20
suppresstopiclist: true
sidenav:
title: {{ getenv "HUGO_MODEL_NAME" }} Model
activerenderdepth: 2
focusrenderdepth: 1
activerenderdepth: -1
inactiverenderdepth: 1
---

Expand Down
14 changes: 7 additions & 7 deletions docs/archetypes/model-reference/json-outline.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ sidenav:
title: JSON Outline
{{ if eq (getenv "HUGO_REF_REVISION") "latest" -}}
aliases:
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" }}
- /documentation/schema/assessment-plan/json-model-map/
- /documentation/schema/assessment-layer/assessment-plan/json-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" }}
- /documentation/schema/assessment-results/json-model-map/
- /documentation/schema/assessment-results-layer/assessment-results/json-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" }}
- /docs/maps/oscal-catalog-json/
- /documentation/schema/catalog/json-model-map/
- /documentation/schema/catalog-layer/catalog/json-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" }}
- /docs/maps/oscal-component-json/
- /documentation/schema/component/json-model-map/
- /documentation/schema/implementation-layer/component/json-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" }}
- /documentation/schema/poam/json-model-map/
- /documentation/schema/assessment-results-layer/poam/json-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" }}
- /docs/maps/oscal-profile-json/
- /documentation/schema/profile/json-model-map/
- /documentation/schema/profile-layer/profile/json-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" }}
- /docs/maps/oscal-ssp-json/
- /documentation/schema/ssp/json-schema-map/
- /documentation/schema/implementation-layer/ssp/json-model-map/
Expand Down
14 changes: 7 additions & 7 deletions docs/archetypes/model-reference/json-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@ toc:
headingselectors: "h1.toc1, h2.toc2, h3.toc3, h4.toc4, h5.toc5, h6.toc6"
{{ if eq (getenv "HUGO_REF_REVISION") "latest" -}}
aliases:
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" -}}
{{ if eq (getenv "HUGO_MODEL_ID") "assessment-plan" }}
- /documentation/schema/assessment-plan/json-schema/
- /documentation/schema/assessment-layer/assessment-plan/json-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" }}
- /documentation/schema/assessment-results/json-schema/
- /documentation/schema/assessment-results-layer/assessment-results/json-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" }}
- /docs/schemas/oscal-catalog-json/
- /documentation/schema/catalog/json-schema/
- /documentation/schema/catalog-layer/catalog/json-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" }}
- /docs/schemas/oscal-component-json/
- /documentation/schema/component/json-schema/
- /documentation/schema/implementation-layer/component/json-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" }}
- /documentation/schema/poam/json-schema/
- /documentation/schema/assessment-results-layer/poam/json-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" }}
- /docs/schemas/oscal-profile-json/
- /documentation/schema/profile/json-schema/
- /documentation/schema/profile-layer/profile/json-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" }}
- /docs/schemas/oscal-ssp-json/
- /documentation/schema/ssp/json-schema/
- /documentation/schema/implementation-layer/ssp/json-schema/
Expand Down
14 changes: 7 additions & 7 deletions docs/archetypes/model-reference/xml-outline.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ sidenav:
title: XML Outline
{{ if eq (getenv "HUGO_REF_REVISION") "latest" -}}
aliases:
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" }}
- /documentation/schema/assessment-plan/xml-model-map/
- /documentation/schema/assessment-layer/assessment-plan/xml-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" }}
- /documentation/schema/assessment-results/xml-model-map/
- /documentation/schema/assessment-results-layer/assessment-results/xml-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" }}
- /docs/maps/oscal-catalog-xml/
- /documentation/schema/catalog/xml-model-map/
- /documentation/schema/catalog-layer/catalog/xml-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" }}
- /docs/maps/oscal-component-xml/
- /documentation/schema/component/xml-model-map/
- /documentation/schema/implementation-layer/component/xml-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" }}
- /documentation/schema/poam/xml-model-map/
- /documentation/schema/assessment-results-layer/poam/xml-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" }}
- /docs/maps/oscal-profile-xml/
- /documentation/schema/profile/xml-model-map/
- /documentation/schema/profile-layer/profile/xml-model-map/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" }}
- /docs/maps/oscal-ssp-xml/
- /documentation/schema/ssp/xml-model-map/
- /documentation/schema/implementation-layer/ssp/xml-model-map/
Expand Down
14 changes: 7 additions & 7 deletions docs/archetypes/model-reference/xml-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@ toc:
headingselectors: "h1.toc1, h2.toc2, h3.toc3, h4.toc4, h5.toc5, h6.toc6"
{{ if eq (getenv "HUGO_REF_REVISION") "latest" -}}
aliases:
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-plan" }}
- /documentation/schema/assessment-plan/xml-schema/
- /documentation/schema/assessment-layer/assessment-plan/xml-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "assessment-results" }}
- /documentation/schema/assessment-results/xml-schema/
- /documentation/schema/assessment-results-layer/assessment-results/xml-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "catalog" }}
- /docs/schemas/oscal-catalog-xml/
- /documentation/schema/catalog/xml-schema/
- /documentation/schema/catalog-layer/catalog/xml-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "component-definition" }}
- /docs/schemas/oscal-component-xml/
- /documentation/schema/component/xml-schema/
- /documentation/schema/implementation-layer/component/xml-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "plan-of-action-and-milestones" }}
- /documentation/schema/poam/xml-schema/
- /documentation/schema/assessment-results-layer/poam/xml-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "profile" }}
- /docs/schemas/oscal-profile-xml/
- /documentation/schema/profile/xml-schema/
- /documentation/schema/profile-layer/profile/xml-schema/
{{- end -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" -}}
{{- if eq (getenv "HUGO_MODEL_ID") "system-security-plan" }}
- /docs/schemas/oscal-ssp-xml/
- /documentation/schema/ssp/xml-schema/
- /documentation/schema/implementation-layer/ssp/xml-schema/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
title: "{{ if eq (getenv "HUGO_REF_VERSION") "develop" }}Development Snapshot Reference{{ else }}OSCAL v{{ getenv "HUGO_REF_VERSION" }} Reference{{ end }}"
summary: "{{ if eq (getenv "HUGO_REF_REVISION") "develop" }}Development Snapshot{{ else if eq (getenv "HUGO_REF_REVISION") "latest" }}Latest Release{{ else }}{{ getenv "HUGO_REF_VERSION" }}{{ end }}"
summary: "{{ if eq (getenv "HUGO_REF_REVISION") "develop" }}Development Snapshot{{ else if eq (getenv "HUGO_REF_REVISION") "latest" }}Latest Release (v{{ getenv "HUGO_REF_VERSION" }}){{ else }}{{ getenv "HUGO_REF_VERSION" }}{{ end }}"
layout: reference-release
weight: {{ if eq (getenv "HUGO_REF_REVISION") "develop" }}20{{ else if eq (getenv "HUGO_REF_REVISION") "latest" }}50{{ else }}70{{ end }}
sidenav:
focusrenderdepth: 2
activerenderdepth: 2
title: {{ if eq (getenv "HUGO_REF_REVISION") "develop" }}Development Snapshot{{ else if eq (getenv "HUGO_REF_REVISION") "latest" }}Latest Release (v{{ getenv "HUGO_REF_VERSION" }}){{ else }}{{ getenv "HUGO_REF_VERSION" }}{{ end }}
focusrenderdepth: {{ if eq (getenv "HUGO_REF_REVISION") "latest" }}2{{ else }}1{{ end }}
activerenderdepth: -1
inactiverenderdepth: 1
debug: false
oscal:
Expand Down
4 changes: 2 additions & 2 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ module:
# target: assets
# - source: i18n
# target: i18n
# - source: archetypes
# target: archetypes
- source: archetypes
target: archetypes
17 changes: 17 additions & 0 deletions docs/content/reference/1.0.0-rc2/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "OSCAL v1.0.0-rc2 Reference"
summary: "1.0.0-rc2"
layout: reference-release
weight: 70
sidenav:
title: 1.0.0-rc2
focusrenderdepth: 1
activerenderdepth: -1
inactiverenderdepth: 1
debug: false
oscal:
type: "tag"
branch: "v1.0.0-rc2"
revision: "1.0.0-rc2"
version: "1.0.0-rc2"
---
22 changes: 22 additions & 0 deletions docs/content/reference/1.0.0-rc2/assessment-plan/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Assessment Plan Model v1.0.0-rc2 Reference"
summary: "Assessment Plan Model"
weight: 20
suppresstopiclist: true
sidenav:
title: Assessment Plan Model
focusrenderdepth: 1
activerenderdepth: -1
inactiverenderdepth: 1
---

<p><span class="usa-tag">Release Version</span> OSCAL v1.0.0-rc2</p>
<p><span class="usa-tag">Github</span> <a href="https://github.com/usnistgov/OSCAL">usnistgov/OSCAL</a> <span class="usa-tag">Tag</span> <a href="https://github.com/usnistgov/OSCAL/tree/v1.0.0-rc2">v1.0.0-rc2</a></p>

The following reference documentation is available for the OSCAL Assessment Plan model.

- **[Conceptual Overview]():** Provides a high-level overview of the model's intended purpose and role in the [OSCAL architecture](/concepts/layer/). Describes the model's purpose, target audience, and key concepts.
- **Outline ([JSON/YAML](json-outline/), [XML](xml-outline/)):** Provides a brief listing of the model's information items organized hierarchically. Useful for understanding the structure and basic syntax of the model in a given format.
- **Reference ([JSON/YAML](json-reference/), [XML](xml-reference/)):** Provides a detailed description of the structure and syntax for the model's information items organized hierarchically. Useful for understanding how to use information items within the model in the given format.
- **Index ([JSON/YAML](json-index/), [XML](xml-index/)):** Provides a listing of the model's information items organized by where they are used.
- **Definitions ([JSON/YAML](json-definitions/), [XML](xml-definitions/)):** Provides a reference for the XML Schema types and JSON Schema definitions derived from this model's [metaschema](https://github.com/usnistgov/OSCAL/blob/v1.0.0-rc2/src/metaschema/oscal_assessment-plan). A metaschema is used to [express the model](/concepts/layer/overview/#modeling-approach) in a format agnostic way, that is then used to generate the XML and JSON Schema, XML <-> JSON content converters, and this reference documentation.
Loading

0 comments on commit 85e7d01

Please sign in to comment.