Skip to content
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

ROLIE feed schema #481

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

tschmidtb51
Copy link
Contributor

  • addresses parts of JSON schema for ROLIE feed #480
  • draft first JSON schema for ROLIE feeds
  • update timestamps of example to conform format "date-time"
  • add test for ROLIE feed schema
  • integrate into GitHub actions

- addresses parts of oasis-tcs#480
- draft first JSON schema for ROLIE feeds
- addresses parts of oasis-tcs#480
- update timestamps to conform format "date-time"
- addresses parts of oasis-tcs#480
- add test for ROLIE feed schema
- integrate into GitHub actions
@tschmidtb51 tschmidtb51 added enhancement examples related to examples in the repo labels Mar 17, 2022
@tschmidtb51 tschmidtb51 self-assigned this Mar 17, 2022
@tschmidtb51
Copy link
Contributor Author

@bernhardreiter Just a first draft that needs refinement...

@santosomar santosomar self-requested a review May 3, 2022 03:57
- addresses parts of oasis-tcs#480
- entry in ROLIE feeds can be empty (e.g. if it just was created)
- addresses parts of oasis-tcs#480
- add missing titles and descriptions
@tschmidtb51 tschmidtb51 marked this pull request as ready for review February 8, 2023 00:14
Copy link
Contributor

@santosomar santosomar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WOW! This is amazing! Great work on this. The ROLIE RFC mentions the support for pagination:

   o  "first" - Indicates that the "href" attribute value of the link
      identifies a resource URI for the furthest preceding page of
      the Feed.

   o  "last" - Indicates that the "href" attribute value of the link
      identifies a resource URI for the furthest following page of
      the Feed.

   o  "previous" - Indicates that the "href" attribute value of the link
      identifies a resource URI for the immediately preceding page of
      the Feed.

   o  "next" - Indicates that the "href" attribute value of the link
      identifies a resource URI for the immediately following page of
      the Feed.

We probably don't have to edit the CSAF ROLIE schema, but probably we can mention it in the documentation? If a ROLIE feed has pagination, will it fail validation of this schema?

@santosomar
Copy link
Contributor

Since pagination could be a problem (probably?), we may need to think about it and document this... The JSON Schema provided doesn't include any specific provisions for pagination. To implement pagination, you would need to provide additional information in the JSON data that represents each feed, such as the number of entries per page and the current page number, etc.

@tschmidtb51
Copy link
Contributor Author

We probably don't have to edit the CSAF ROLIE schema, but probably we can mention it in the documentation? If a ROLIE feed has pagination, will it fail validation of this schema?

The validation won't fail in the "simple" version but in the "strict" one. The "simple" one will just ignore any property that is not in the schema.

I didn't implement all the fields from section 6.1. So the question is: Should we do that? I guess it could be beneficial...

@sthagen, @santosomar: Thoughts?

@@ -0,0 +1,291 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.0/json_schema/ROLIE_feed_json_schema.json",
Copy link
Contributor

@sthagen sthagen Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest we maintain lowercase file names and identities.

Maybe we should discuss the folder location also, as schema validation often is tried with identifying an identifier with a URL and maybe OASIS TC admins can help us with the folder location of schemas added "after the fact" of standardization - in the related issue I suggest using a sibling folder to json_schema with an optional_ prefix. @chet-ensign @OASIS-OP-Admin can maybe guide us here?

@sthagen sthagen self-requested a review February 8, 2023 14:39
@tschmidtb51
Copy link
Contributor Author

Converting it back to draft to implement missing fields and address changes from reviewers.

@tschmidtb51 tschmidtb51 marked this pull request as draft February 8, 2023 15:59
@oxisto
Copy link

oxisto commented Nov 12, 2024

Are there any plans to continue this? I could volunteer to pick this up again. I think this would be very helpful to implement ROLIE in kotlin-csaf.

@tschmidtb51
Copy link
Contributor Author

tschmidtb51 commented Nov 13, 2024

Are there any plans to continue this? I could volunteer to pick this up again. I think this would be very helpful to implement ROLIE in kotlin-csaf.

Plans: yes, but it has been a low priority for the editors.
So, if you want to volunteer - please go ahead.

@oxisto
Copy link

oxisto commented Nov 13, 2024

Are there any plans to continue this? I could volunteer to pick this up again. I think this would be very helpful to implement ROLIE in kotlin-csaf.

Plans: yes, but it has been a low priority for the editors. So, if you want to volunteer - please go ahead.

Got it. We got it to work in our initial implementation and I will test this with different providers now, if we encounter any issues, I will update the schema accordingly.

@tschmidtb51
Copy link
Contributor Author

tschmidtb51 commented Nov 13, 2024

Please also have a look at the reviewers' comments and address them in you approach.

Also, please move the JSON Schema into the referenced_schemas/rfc8322

@oxisto
Copy link

oxisto commented Nov 13, 2024

Please also have a look at the reviewers' comments and address them in you approach.

Also, please move the JSON Schema into the referenced_schemas/rfc8322

Got it, I probably need to create a new pull request for this then, since I edit this one.

@tschmidtb51
Copy link
Contributor Author

Got it. We got it to work in our initial implementation and I will test this with different providers now, if we encounter any issues, I will update the schema accordingly.

Note, that some features might not be used yet but publicly available providers (e.g. pagination).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement examples related to examples in the repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants