-
Notifications
You must be signed in to change notification settings - Fork 40
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
base: master
Are you sure you want to change the base?
ROLIE feed schema #481
Conversation
tschmidtb51
commented
Mar 17, 2022
- 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
@bernhardreiter Just a first draft that needs refinement... |
- 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
There was a problem hiding this 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?
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. |
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", |
There was a problem hiding this comment.
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?
Converting it back to draft to implement missing fields and address changes from reviewers. |
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. |
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. |
Please also have a look at the reviewers' comments and address them in you approach. Also, please move the JSON Schema into the |
Got it, I probably need to create a new pull request for this then, since I edit this one. |
Note, that some features might not be used yet but publicly available providers (e.g. pagination). |