Skip to content

Commit 1fe11b8

Browse files
committed
Removed duplicate related-observation definitions from assessment metaschemas
The related-observation assembly was defined locally three times, causing JSON schema generation issues. Consolidated into a single reusable definition. Fixes #2178
1 parent a741c5b commit 1fe11b8

File tree

2 files changed

+16
-27
lines changed

2 files changed

+16
-27
lines changed

src/metaschema/oscal_assessment-common_metaschema.xml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -829,16 +829,9 @@
829829
<description>A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the implementation statement in the SSP to which this finding is related.</description>
830830
</define-field>
831831
<!-- CHANGED: replaced embedded observation with references -->
832-
<define-assembly name="related-observation" max-occurs="unbounded">
833-
<formal-name>Related Observation</formal-name>
834-
<description>Relates the finding to a set of referenced observations that were used to determine the finding.</description>
832+
<assembly ref="related-observation" max-occurs="unbounded">
835833
<group-as name="related-observations" in-json="ARRAY"/>
836-
<define-flag name="observation-uuid" as-type="uuid" required="yes">
837-
<formal-name>Observation Universally Unique Identifier Reference</formal-name>
838-
<!-- Identifier Reference -->
839-
<description>A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.</description>
840-
</define-flag>
841-
</define-assembly>
834+
</assembly>
842835
<!-- CHANGED: replaced "risk" with new "assciated-risk" -->
843836
<define-assembly name="associated-risk" max-occurs="unbounded">
844837
<formal-name>Associated Risk</formal-name>
@@ -854,6 +847,16 @@
854847
</model>
855848
</define-assembly>
856849

850+
<define-assembly name="related-observation">
851+
<formal-name>Related Observation</formal-name>
852+
<description>Relates the identified element to a set of referenced observations that were used to support its determination.</description>
853+
<define-flag name="observation-uuid" as-type="uuid" required="yes">
854+
<formal-name>Observation Universally Unique Identifier Reference</formal-name>
855+
<!-- Identifier Reference -->
856+
<description>A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.</description>
857+
</define-flag>
858+
</define-assembly>
859+
857860
<define-assembly name="observation">
858861
<formal-name>Observation</formal-name>
859862
<description>Describes an individual observation.</description>
@@ -1296,16 +1299,9 @@
12961299
</model>
12971300
</define-assembly>
12981301

1299-
<define-assembly name="related-observation" max-occurs="unbounded">
1300-
<formal-name>Related Observation</formal-name>
1301-
<description>Relates the finding to a set of referenced observations that were used to determine the finding.</description>
1302+
<assembly ref="related-observation" max-occurs="unbounded">
13021303
<group-as name="related-observations" in-json="ARRAY"/>
1303-
<define-flag name="observation-uuid" as-type="uuid" required="yes">
1304-
<formal-name>Observation Universally Unique Identifier Reference</formal-name>
1305-
<!-- Identifier Reference -->
1306-
<description>A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.</description>
1307-
</define-flag>
1308-
</define-assembly>
1304+
</assembly>
13091305
</model>
13101306
<constraint>
13111307
<!-- REVIEW THIS -->

src/metaschema/oscal_poam_metaschema.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,9 @@
147147
<!-- CHANGED: removed "objective-status" per brianrufgsa -->
148148
<!-- CHANGED: (per Brian) removed "implementation-statement-uuid" since this is in the SAR -->
149149
<!-- CHANGED: replaced embedded observation with references -->
150-
<define-assembly name="related-observation" max-occurs="unbounded">
151-
<formal-name>Related Observation</formal-name>
152-
<description>Relates the poam-item to a set of referenced observations that were used to determine the finding.</description>
150+
<assembly ref="related-observation" max-occurs="unbounded">
153151
<group-as name="related-observations" in-json="ARRAY"/>
154-
<define-flag name="observation-uuid" as-type="uuid" required="yes">
155-
<formal-name>Observation Universally Unique Identifier Reference</formal-name>
156-
<!-- Identifier Reference -->
157-
<description>A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.</description>
158-
</define-flag>
159-
</define-assembly>
152+
</assembly>
160153

161154
<!-- CHANGED: replaced "risk" with new "assciated-risk" -->
162155
<define-assembly name="associated-risk" max-occurs="unbounded">

0 commit comments

Comments
 (0)