Skip to content

Mark start and end metaschema flags for protocol as required #2119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

inickles
Copy link

@inickles inickles commented Mar 7, 2025

This replaces the metaschema constraint tests to ensure start and end flags are set and instead marks them as required in flag definition itself the requirement is expressed in the resulting XML and JSON schemas.

The diffs in the resulting schemas:

oscal_complete_schema.xsd:

3088c3088
<       <xs:attribute name="start" type="NonNegativeIntegerDatatype">
---
>       <xs:attribute name="start" use="required" type="NonNegativeIntegerDatatype">
3098c3098
<       <xs:attribute name="end" type="NonNegativeIntegerDatatype">
---
>       <xs:attribute name="end" use="required" type="NonNegativeIntegerDatatype">

oscal_complete_schema.json:

1889a1890,1892
>     "required" :
>     [ "start",
>      "end" ],

Committer Notes

{Please provide a brief description of what this PR accomplishes. Be sure to reference any issues addressed. If the PR is a work-in-progress submitted for early review, please include [WIP] at the beginning of the title or mark the PR as DRAFT.}

All Submissions:

By submitting a pull request, you are agreeing to provide this contribution under the CC0 1.0 Universal public domain dedication.

(For reviewers: The wiki has guidance on code review and overall issue review for completeness.)

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you included examples of how to use your new feature(s)?
  • Have you updated the OSCAL website and readme documentation affected by the changes you made? Changes to the OSCAL website can be made in the OSCAL-Pages and OSCAL_Reference repositories.

…t is

expressed in the resulting XML and JSON schemas, instead of using a
metaschema constraint test.
@inickles inickles requested a review from a team as a code owner March 7, 2025 17:47
@iMichaela
Copy link
Contributor

Mandating the start and end to always exist was not the intend here. An author should be allowed to not specify neither start or end of the port range. Only when start is specified, an end must be also specified, and vice versa.

@iMichaela iMichaela closed this Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants