Skip to content

Show comments of JSON Schema in Documentation #336

Closed

Description

@andreas-hilti

The comments that are part of the JSON schema are not shown in the documentation. Can they be added?

Example:
refType has a comment

"$comment": "value SHOULD not start with the BOM-Link intro 'urn:cdx:'"

"refType": {
"description": "Identifier for referable and therefore interlink-able elements.",
"type": "string",
"minLength": 1,
"$comment": "value SHOULD not start with the BOM-Link intro 'urn:cdx:'"
},

However, this does not show up in the documentation:
https://cyclonedx.org/docs/1.5/json/#metadata_component_bom-ref
grafik

Activity

  1. andreas-hilti commented on Nov 12, 2023

    @andreas-hilti
    ContributorAuthor

    This is similar in spirit to #273.

  2. jkowalleck commented on Nov 12, 2023

    @jkowalleck
    Member

    Current JSON docs generator in insufficient to do so, according to coveooss/json-schema-for-humans#198

  3. jkowalleck commented on Nov 12, 2023

    @jkowalleck
    Member

    What you are referring to is a comment by me, the author. This is nothing relevant for documentation, so I thought at the time I wrote it.

    The fact that the "value SHOULD not start with the BOM-Link intro 'urn:cdx:'" was stated, because it was a note for readers of the schema, in case they needed it for deeper understanding of the background of the change i made via 626dbbc
    It was a comment for the future times when CycloneDX 2.0 would be written, when breaking changes would be allowed - when we would add regex-constraints to that element.

    It is a mere comment, like

    "$comment": "part of the pattern is based on `bom.serialNumber`'s pattern"

    If you feel this comment has more value, I'd suggest you pullrequest a change and put this $comment into the description.

  4. andreas-hilti commented on Nov 15, 2023

    @andreas-hilti
    ContributorAuthor

    Thanks, @jkowalleck. In my opinion, there are two aspects:

    I can open a PR.

  5. jkowalleck commented on Nov 15, 2023

    @jkowalleck
    Member

    I can open a PR.

    please do 👍
    If this note is moved into the description, the $comment would simply be something like "TODO (breaking change): add a format constraint, that prevents the value from staring with urn:cdx:'" or something like this.

  6. linked a pull request that will close this issueEnhance descriptions of `bom-ref` #344on Nov 19, 2023
  7. added a commit that references this issue on Nov 26, 2023
  8. added this to the 1.6 milestone on Nov 27, 2023
  9. linked a pull request that will close this issuev1.6 #323on Nov 27, 2023
  10. jkowalleck commented on Jan 16, 2024

    @jkowalleck
    Member

    all work done. enhancement was merged to 1.6

  11. removed a link to a pull requestv1.6 #323on Jan 16, 2024
  12. added a commit that references this issue on Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions