Skip to content
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

Resolves issue #907 fixes error in Swagger doc response json for GET /cve #997

Merged
merged 2 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,16 @@
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "/schemas/errors/generic.json"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
Expand Down Expand Up @@ -570,6 +580,16 @@
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "/schemas/errors/generic.json"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/cve/list-cve-records-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"type": "integer",
"format": "int32"
},
"cve_records": {
"cveRecords": {
"type": "array",
"items": {
"type": "object",
Expand Down
14 changes: 13 additions & 1 deletion test-http/src/test/user_tests/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ def test_put_user_update_name():

assert json.loads(res.content.decode())['name']['first'] == test_name

# put the name back to what it was because tests don't reset the data

res = requests.put(
f'{env.AWG_BASE_URL}/api/org/{org["short_name"]}/user/{test_user["username"]}',
headers=utils.BASE_HEADERS,
params={
'name.first': test_user['name']['first']
}
)

assert res.status_code == 200



def test_put_user_error_for_same_org():
Expand Down Expand Up @@ -172,4 +184,4 @@ def test_put_user_error_for_same_org():
err = json.loads(res.content.decode())

assert err['error'] == 'USER_ALREADY_IN_ORG'
assert err['message'] == 'The user could not be updated because the user \'cps@mitre.org\' already belongs to the \'mitre\' organization.'
assert err['message'] == f'The user could not be updated because the user \'{test_user["username"]}\' already belongs to the \'{org["short_name"]}\' organization.'