Skip to content

Commit b9fbf34

Browse files
authored
Merge pull request #1837 from CVEProject/dev
Updating Staging from Dev
2 parents b47c1e0 + cffcc6a commit b9fbf34

64 files changed

Lines changed: 3061 additions & 748 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api-docs/openapi.json

Lines changed: 180 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"servers": [
1313
{
14-
"url": "https://cveawg-dev.mitre.org/api"
14+
"url": "urlplaceholder"
1515
}
1616
],
1717
"paths": {
@@ -2080,8 +2080,8 @@
20802080
},
20812081
"example": {
20822082
"short_name": "fake_company",
2083-
"name": "Fake Company",
2084-
"hard_quota": 1000,
2083+
"long_name": "Fake Company",
2084+
"id_quota": 1000,
20852085
"authority": [
20862086
"CNA"
20872087
]
@@ -2140,18 +2140,15 @@
21402140
"users": [
21412141
{
21422142
"UUID": "fe566221-6a2c-4279-8800-4d3795325997",
2143-
"org_UUID": "9e243a41-352b-426a-9dfd-f664b4c71e80",
21442143
"username": "jdoe",
21452144
"name": {
21462145
"first": "John",
21472146
"last": "Doe"
21482147
},
21492148
"role": "ADMIN",
2150-
"is_active": true,
2151-
"time": {
2152-
"created": "2021-02-12T17:15:37.382Z",
2153-
"modified": "2021-02-12T17:15:37.382Z"
2154-
}
2149+
"status": "active",
2150+
"created": "2021-02-12T17:15:37.382Z",
2151+
"last_updated": "2021-02-12T17:15:37.382Z"
21552152
}
21562153
]
21572154
}
@@ -2211,14 +2208,14 @@
22112208
}
22122209
}
22132210
},
2214-
"/registry/org/{shortname}/hard_quota": {
2211+
"/registry/org/{shortname}/id_quota": {
22152212
"get": {
22162213
"tags": [
22172214
"Registry Organization"
22182215
],
22192216
"summary": "Retrieves an organization's CVE ID quota (accessible to all registered users)",
22202217
"description": " <h2>Access Control</h2> <p>All registered users can access this endpoint</p> <h2>Expected Behavior</h2> <p><b>Regular, CNA & Admin Users:</b> Retrieves the CVE ID quota for the user's organization</p> <p><b>Secretariat:</b> Retrieves the CVE ID quota for any organization</p>",
2221-
"operationId": "orgHardQuota",
2218+
"operationId": "orgIdQuota",
22222219
"parameters": [
22232220
{
22242221
"name": "shortname",
@@ -2542,6 +2539,20 @@
25422539
"application/json": {
25432540
"schema": {
25442541
"$ref": "../schemas/registry-user/update-registry-user-response.json"
2542+
},
2543+
"example": {
2544+
"message": "jdoe was successfully updated.",
2545+
"updated": {
2546+
"UUID": "fe566221-6a2c-4279-8800-4d3795325997",
2547+
"username": "jdoe",
2548+
"name": {
2549+
"first": "John",
2550+
"last": "Doe"
2551+
},
2552+
"status": "active",
2553+
"created": "2021-02-12T17:15:37.382Z",
2554+
"last_updated": "2021-02-12T17:15:37.382Z"
2555+
}
25452556
}
25462557
}
25472558
}
@@ -2605,7 +2616,7 @@
26052616
"Registry Organization"
26062617
],
26072618
"summary": "Updates information about the organization specified by short name (accessible Temporarily to Secretariat only)",
2608-
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role temporarily.</p> <p>In the future, only the organization's admin will be able to request changes to its information.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>contact_info.phone</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
2619+
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role temporarily.</p> <p>In the future, only the organization's admin will be able to request changes to its information.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>contact_info.phone</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>advisory_location_require_credentials</li> <li>vulnerability_advisory_location_for_web_scraping</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
26092620
"operationId": "orgUpdateSingle",
26102621
"parameters": [
26112622
{
@@ -2698,8 +2709,8 @@
26982709
},
26992710
"example": {
27002711
"short_name": "fake_company",
2701-
"name": "Fake Company",
2702-
"hard_quota": 1000,
2712+
"long_name": "Fake Company",
2713+
"id_quota": 1000,
27032714
"authority": [
27042715
"CNA"
27052716
]
@@ -2745,6 +2756,21 @@
27452756
"schema": {
27462757
"$ref": "../schemas/registry-user/create-registry-user-response.json"
27472758
}
2759+
},
2760+
"example": {
2761+
"message": "jdoe was successfully created.",
2762+
"created": {
2763+
"UUID": "fe566221-6a2c-4279-8800-4d3795325997",
2764+
"username": "jdoe",
2765+
"name": {
2766+
"first": "John",
2767+
"last": "Doe"
2768+
},
2769+
"status": "active",
2770+
"secret": "12345-abcde-67890",
2771+
"created": "2021-02-12T17:15:37.382Z",
2772+
"last_updated": "2021-02-12T17:15:37.382Z"
2773+
}
27482774
}
27492775
}
27502776
},
@@ -2806,6 +2832,13 @@
28062832
"schema": {
28072833
"$ref": "../schemas/registry-user/create-registry-user-request.json"
28082834
}
2835+
},
2836+
"example": {
2837+
"username": "jdoe",
2838+
"name": {
2839+
"first": "John",
2840+
"last": "Doe"
2841+
}
28092842
}
28102843
}
28112844
}
@@ -3575,6 +3608,13 @@
35753608
},
35763609
"description": "The shortname of the organization"
35773610
},
3611+
{
3612+
"name": "registry",
3613+
"in": "query",
3614+
"schema": {
3615+
"type": "string"
3616+
}
3617+
},
35783618
{
35793619
"$ref": "#/components/parameters/id_quota"
35803620
},
@@ -4522,6 +4562,24 @@
45224562
"application/json": {
45234563
"schema": {
45244564
"$ref": "../schemas/conversation/list-conversations-response.json"
4565+
},
4566+
"example": {
4567+
"totalCount": 1,
4568+
"itemsPerPage": 10,
4569+
"pageCount": 1,
4570+
"currentPage": 1,
4571+
"prevPage": null,
4572+
"nextPage": null,
4573+
"conversations": [
4574+
{
4575+
"UUID": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
4576+
"target_uuid": "123e4567-e89b-12d3-a456-426614174000",
4577+
"author_id": "fe566221-6a2c-4279-8800-4d3795325997",
4578+
"author_name": "John Doe",
4579+
"body": "This is a conversation message.",
4580+
"posted_at": "2021-02-12T17:15:37.382Z"
4581+
}
4582+
]
45254583
}
45264584
}
45274585
}
@@ -4622,6 +4680,24 @@
46224680
"application/json": {
46234681
"schema": {
46244682
"$ref": "../schemas/conversation/list-conversations-response.json"
4683+
},
4684+
"example": {
4685+
"totalCount": 1,
4686+
"itemsPerPage": 10,
4687+
"pageCount": 1,
4688+
"currentPage": 1,
4689+
"prevPage": null,
4690+
"nextPage": null,
4691+
"conversations": [
4692+
{
4693+
"UUID": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
4694+
"target_uuid": "123e4567-e89b-12d3-a456-426614174000",
4695+
"author_id": "fe566221-6a2c-4279-8800-4d3795325997",
4696+
"author_name": "John Doe",
4697+
"body": "This is a conversation message.",
4698+
"posted_at": "2021-02-12T17:15:37.382Z"
4699+
}
4700+
]
46254701
}
46264702
}
46274703
}
@@ -4712,6 +4788,14 @@
47124788
"application/json": {
47134789
"schema": {
47144790
"$ref": "../schemas/conversation/conversation.json"
4791+
},
4792+
"example": {
4793+
"UUID": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
4794+
"target_uuid": "123e4567-e89b-12d3-a456-426614174000",
4795+
"author_id": "fe566221-6a2c-4279-8800-4d3795325997",
4796+
"author_name": "John Doe",
4797+
"body": "This is a conversation message.",
4798+
"posted_at": "2021-02-12T17:15:37.382Z"
47154799
}
47164800
}
47174801
}
@@ -4782,6 +4866,9 @@
47824866
"required": [
47834867
"body"
47844868
]
4869+
},
4870+
"example": {
4871+
"body": "This is a conversation message."
47854872
}
47864873
}
47874874
}
@@ -4823,6 +4910,16 @@
48234910
"application/json": {
48244911
"schema": {
48254912
"$ref": "../schemas/conversation/conversation.json"
4913+
},
4914+
"example": {
4915+
"UUID": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
4916+
"target_uuid": "123e4567-e89b-12d3-a456-426614174000",
4917+
"author_id": "fe566221-6a2c-4279-8800-4d3795325997",
4918+
"author_name": "John Doe",
4919+
"body": "This is an updated conversation message.",
4920+
"visibility": "public",
4921+
"posted_at": "2021-02-12T17:15:37.382Z",
4922+
"edited_at": "2021-02-12T17:20:00.000Z"
48264923
}
48274924
}
48284925
}
@@ -4898,6 +4995,10 @@
48984995
"description": "The updated visibility of the conversation message"
48994996
}
49004997
}
4998+
},
4999+
"example": {
5000+
"body": "This is an updated conversation message.",
5001+
"visibility": "public"
49015002
}
49025003
}
49035004
}
@@ -4939,6 +5040,16 @@
49395040
"application/json": {
49405041
"schema": {
49415042
"$ref": "../schemas/review/review.json"
5043+
},
5044+
"example": {
5045+
"uuid": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
5046+
"target_object_uuid": "123e4567-e89b-12d3-a456-426614174000",
5047+
"status": "PENDING",
5048+
"new_review_data": {
5049+
"name": "New Organization Name"
5050+
},
5051+
"created": "2021-02-12T17:15:37.382Z",
5052+
"last_updated": "2021-02-12T17:15:37.382Z"
49425053
}
49435054
}
49445055
}
@@ -5031,6 +5142,16 @@
50315142
"application/json": {
50325143
"schema": {
50335144
"$ref": "../schemas/review/review.json"
5145+
},
5146+
"example": {
5147+
"uuid": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
5148+
"target_object_uuid": "123e4567-e89b-12d3-a456-426614174000",
5149+
"status": "PENDING",
5150+
"new_review_data": {
5151+
"name": "New Organization Name"
5152+
},
5153+
"created": "2021-02-12T17:15:37.382Z",
5154+
"last_updated": "2021-02-12T17:15:37.382Z"
50345155
}
50355156
}
50365157
}
@@ -5130,6 +5251,26 @@
51305251
"application/json": {
51315252
"schema": {
51325253
"$ref": "../schemas/review/list-reviews-response.json"
5254+
},
5255+
"example": {
5256+
"totalCount": 1,
5257+
"itemsPerPage": 100,
5258+
"pageCount": 1,
5259+
"currentPage": 1,
5260+
"prevPage": null,
5261+
"nextPage": null,
5262+
"reviews": [
5263+
{
5264+
"uuid": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
5265+
"target_object_uuid": "123e4567-e89b-12d3-a456-426614174000",
5266+
"status": "PENDING",
5267+
"new_review_data": {
5268+
"name": "New Organization Name"
5269+
},
5270+
"created": "2021-02-12T17:15:37.382Z",
5271+
"last_updated": "2021-02-12T17:15:37.382Z"
5272+
}
5273+
]
51335274
}
51345275
}
51355276
}
@@ -5330,6 +5471,16 @@
53305471
"application/json": {
53315472
"schema": {
53325473
"$ref": "../schemas/review/review.json"
5474+
},
5475+
"example": {
5476+
"uuid": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
5477+
"target_object_uuid": "123e4567-e89b-12d3-a456-426614174000",
5478+
"status": "PENDING",
5479+
"new_review_data": {
5480+
"name": "New Organization Name"
5481+
},
5482+
"created": "2021-02-12T17:15:37.382Z",
5483+
"last_updated": "2021-02-12T17:15:37.382Z"
53335484
}
53345485
}
53355486
}
@@ -5392,6 +5543,11 @@
53925543
"schema": {
53935544
"type": "object",
53945545
"description": "The updated review data"
5546+
},
5547+
"example": {
5548+
"new_review_data": {
5549+
"name": "New Organization Name"
5550+
}
53955551
}
53965552
}
53975553
}
@@ -5433,6 +5589,16 @@
54335589
"application/json": {
54345590
"schema": {
54355591
"$ref": "../schemas/review/review.json"
5592+
},
5593+
"example": {
5594+
"uuid": "c8a41738-f9d6-4447-9755-9ab0101b7a2d",
5595+
"target_object_uuid": "123e4567-e89b-12d3-a456-426614174000",
5596+
"status": "PENDING",
5597+
"new_review_data": {
5598+
"name": "New Organization Name"
5599+
},
5600+
"created": "2021-02-12T17:15:37.382Z",
5601+
"last_updated": "2021-02-12T17:15:37.382Z"
54365602
}
54375603
}
54385604
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
"populate-cve:stage": "NODE_ENV=staging node src/scripts/populate-cve.js",
9191
"populate-cve:int": "NODE_ENV=integration node src/scripts/populate-cve.js",
9292
"populate-cve:prd": "NODE_ENV=production node src/scripts/populate-cve.js",
93+
"generate": "NODE_ENV=test node src/scripts/test_data/generate.js",
94+
"reset-keys": "NODE_ENV=test node src/scripts/test_data/reset_keys.js",
9395
"start:dev": "node src/swagger.js && TZ=utc NODE_ENV=development node src/scripts/updateOpenapiHost.js && TZ=utc NODE_ENV=development node-dev src/index.js",
9496
"dev": "node src/swagger.js && TZ=utc NODE_ENV=development node src/scripts/updateOpenapiHost.js && TZ=utc NODE_ENV=development node-dev src/index.js",
9597
"start:stage": "node src/swagger.js && NODE_ENV=staging node src/scripts/updateOpenapiHost.js && NODE_ENV=staging node src/index.js",

schemas/glossary/list-glossary-items-response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"glossary": {
66
"type": "array",
77
"items": {
8-
"type": "object"
8+
"$ref": "glossary.json"
99
}
1010
}
1111
},

0 commit comments

Comments
 (0)