Conversation
…nd 304. Closes CycloneDX#289. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
…tching. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
taleodor
left a comment
There was a problem hiding this comment.
Thanks, this lands everything from #289 and the spec validates. Three things before merge.
1. Body media type does not match the summary. The summary says content download bodies are */*, but all four download responses still key on application/octet-stream, and the new description text says so. Please switch the four content keys to "*/*" with the existing binary schema. That is the truthful declaration, since the wire Content-Type is the format's mediaType, it also covers signatures where the server knows a more specific type, and it validates. If the Go generator cannot handle */*, keep octet-stream, state in the description that the key is a placeholder for the format's mediaType, and update the summary to match. Either way the summary and the spec should agree.
2. Fewer new components. Six are added; three are enough.
artifact-etag-requiredandsignature-etag-requiredduplicate the existing ETag headers withrequired: trueflipped, and they are the only response headers in the spec carrying that flag. Two definitions of the same header will drift. The "shall" already lives in the prose on the latest responses and operations, so please referenceartifact-etag/signature-etagand drop the duplicates.- The two 304 responses differ only in which header refs they list. A single
304-not-modifiedwith genericETag,Cache-Control,Content-LocationandVarystring headers, plus the existing "repeat from the would-be 200" prose, covers all four operations. The Vary line already says "when used on the corresponding 200". if-none-matchandartifact-vary-acceptare referenced three or four times each and are fine as components.
3. The 304 responses reference the optional ETag header even for the latest operations where the 200 requires it. If the -required duplicates go per point 2. this resolves itself.
…ETags. Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
|
Thanks @taleodor |
Summary
Vary: Acceptonly when Accept drove content selection, and download response bodies modeled as*/*.Content-Location(API base + version +?mediaType=) on content and signature downloads, including versioned responses.If-None-Match+ bodyless304on all four download operations; shall revalidate on latest; should emit ETag / shall honor when present on versioned; HEAD and redirect notes.Closes #289.
Test plan
If-None-Match, shared304-not-modified, and Content-Location/Vary*/**/*