Skip to content

Commit

Permalink
Merge pull request #1224 from CVEProject/jd-808
Browse files Browse the repository at this point in the history
Resolves #808 Updated docs to warn of possible race condition
  • Loading branch information
david-rocca authored May 6, 2024
2 parents 73e1bae + 106eba6 commit 1f48bba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@
}
},
"requestBody": {
"description": "<h3>Notes:</h3> <ul> <li>**providerMetadata** is set by the server. If provided, it will be overwritten.</li> <li>**datePublished** and **assignerShortname** are optional fields in the schema, but are set by the server. </li> </ul>",
"description": "<h3>Notes:</h3> <ul> <li>When updating a rejected record to published, it is recommended to confirm that both the Cve-Id and CVE record are in the REJECTED state after calling this endpoint. Though very unlikely, a race condition can occur causing the two states to be out of sync. </li> <li>**providerMetadata** is set by the server. If provided, it will be overwritten.</li> <li>**datePublished** and **assignerShortname** are optional fields in the schema, but are set by the server. </li> </ul>",
"required": true,
"content": {
"application/json": {
Expand Down Expand Up @@ -1693,7 +1693,7 @@
}
},
"requestBody": {
"description": "<h3>Notes:</h3> <ul> <li>**providerMetadata** is set by the server. If provided, it will be overwritten.</li> <li>**datePublished** and **assignerShortname** are optional fields in the schema, but are set by the server. </li> </ul>",
"description": "<h3>Notes:</h3> <ul> <li>It is recommended to confirm that both the Cve-Id and CVE record are in the REJECTED state after calling this endpoint. Though very unlikely, a race condition can occur causing the two states to be out of sync. </li> <li>**providerMetadata** is set by the server. If provided, it will be overwritten.</li> <li>**datePublished** and **assignerShortname** are optional fields in the schema, but are set by the server. </li> </ul>",
"required": true,
"content": {
"application/json": {
Expand Down
6 changes: 4 additions & 2 deletions src/controller/cve.controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ router.put('/cve/:id/cna',
#swagger.requestBody = {
description: '<h3>Notes:</h3>
<ul>
<li>When updating a rejected record to published, it is recommended to confirm that both the Cve-Id and CVE record are in the correct state after calling this endpoint. Though very unlikely, a race condition can occur causing the two states to be out of sync. </li>
<li>**providerMetadata** is set by the server. If provided, it will be overwritten.</li>
<li>**datePublished** and **assignerShortname** are optional fields in the schema, but are set by the server. </li>
</ul>',
Expand Down Expand Up @@ -824,11 +825,12 @@ router.put('/cve/:id/reject',
'#/components/parameters/apiSecretHeader'
]
#swagger.requestBody = {
description: '<h3>Notes:</h3>
description: "<h3>Notes:</h3>
<ul>
<li>It is recommended to confirm that both the Cve-Id and CVE record are in the REJECTED state after calling this endpoint. Though very unlikely, a race condition can occur causing the two states to be out of sync. </li>
<li>**providerMetadata** is set by the server. If provided, it will be overwritten.</li>
<li>**datePublished** and **assignerShortname** are optional fields in the schema, but are set by the server. </li>
</ul>',
</ul>",
required: true,
content: {
"application/json": {
Expand Down

0 comments on commit 1f48bba

Please sign in to comment.