-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
V1.5 dev resourceReferenceChoice ref clarifications #251
V1.5 dev resourceReferenceChoice ref clarifications #251
Conversation
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
current proposal was designed to document that the linked Need an answer: what should it be? Either any document or same document only or external document only? Will modify this PR depending on the answer. |
@jkowalleck You have it correct in its intent. That is, for workflows (formulation) it was intended to link to resources (components/services) in the same BOM. The "choice" allows you to use an externalReference (which is what was used for a bom-link) although I have seen hints of discussions a couple weeks ago about making an independent object for BOMLink. If indeed there is a movement away from externalReference for bom-link (that is, it will be deprecated, then that new option could possibly be added to the "choice" object. The whole reason choice is exists is to link to resources locally, via bom-ref or externally via externalReference (as these were the only two options I was aware of at time of authoring). |
@mrutkows |
as it was intended to link to components/services in current or external docuemnts (#251 (comment)) |
@jkowalleck hehe, I do not "remember" (as I only saw some hints in emails) as this was never discussed in either the Formulation, Attestations or ML work groups I attended ;) and really have no idea what that means in terms of invalidating the use of Also, it appears from your link to the XSD that it is an addition (i.e., "union") which now includes a new explicit type... which is fine the way I read it (guessing from the XSD terminology). That is, it is just a new way to use |
Unfortunately, there was no hint in the docs, how a BOM-link could be detected or where it was allowed to be used.
changes were purely documentations, no need for any working group, as @stevespringett told me. Strings are still strings, URIs are still URIs.
To improve the situation, a new type for BOM-Link was introduced in the schema, which is just another
exactly. No format changes, just documentation and helpers for machine readability. |
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@mrutkows could you review the PR again, and mark it as approved/rejected ? changes since your previous comment:
|
@@ -3645,7 +3645,10 @@ | |||
"ref": { | |||
"title": "BOM Reference", | |||
"description": "References an object by its bom-ref attribute", | |||
"$ref": "#/definitions/refType" |
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.
was any string
@@ -3645,7 +3645,10 @@ | |||
"ref": { | |||
"title": "BOM Reference", | |||
"description": "References an object by its bom-ref attribute", | |||
"$ref": "#/definitions/refType" | |||
"anyOf": [ | |||
{"$ref": "#/definitions/refLinkType"}, |
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.
is any string
"$ref": "#/definitions/refType" | ||
"anyOf": [ | ||
{"$ref": "#/definitions/refLinkType"}, | ||
{"$ref": "#/definitions/bomLinkElementType"} |
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.
is any string with iri-reference
format and a certain regex/format/pattern for BOM-Link
@@ -4356,12 +4356,15 @@ limitations under the License. | |||
<xs:complexType name="resourceReferenceType"> | |||
<xs:sequence> | |||
<xs:choice> | |||
<xs:element name="ref" type="bom:refType" minOccurs="1" maxOccurs="1"> |
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.
was any string
<xs:annotation> | ||
<xs:documentation> | ||
References an object by its bom-ref attribute | ||
</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:union memberTypes="bom:refLinkType bom:bomLinkElementType"/> |
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.
is any of:
bom:refLinkType
: any stringbom:bomLinkElementType
:anyURI
string with a certain pattern/format for BOM-Link
@jkowalleck Thanks for educating me on these new definitions. It appears the important part, relative to workflow, is whereever we reference the "properties": {
"ref": {
"title": "BOM Reference",
"description": "References an object by its bom-ref attribute",
"anyOf": [
{"$ref": "#/definitions/refLinkType"},
{"$ref": "#/definitions/bomLinkElementType"}
]
},
"externalReference": {
"title": "External reference",
"description": "Reference to an externally accessible resource.",
"$ref": "#/definitions/externalReference"
}
}, It looks quite good and understand the rationale (sorry I was not aware before now). I approve this change, but please know I will not have time to "test" this change anytime soon. Looking purely at the schema, it should work for the original "bom-ref" case (as part of the "choice"). Thanks again. |
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.
Please see my summary comments above.
LGTM @jkowalleck. If it's passing the tests, please merge this in. |
@mrutkows could you help improve the schema in terms of documentation?
the
resourceReferenceChoice.ref
is intended to link to abom-ref
.Question: Must this link to a
bom-ref
in the same document, or would it also be okay to link to abom-ref
in another document aswell, using a BOM-Link?depending on your answer, I might need to modify the content of this PR.
see comments below ...
there was some documentation enhancement brought into the schema to make this much clearer.
followup of #236 & #222
caused by #136 and #217