DEV: Document anonymize user api endpoint (#13893)

Adding the anonymize user endpoint to the api docs.

See: https://meta.discourse.org/t/158704/7
This commit is contained in:
Blake Erickson 2021-07-29 17:40:41 -06:00 committed by GitHub
parent 200a75e4b6
commit 1c60be7658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"additionalProperties": false,
"properties": {
"success": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"success",
"username"
]
}

View File

@ -337,6 +337,30 @@ describe 'users' do
end
end
path '/admin/users/{id}/anonymize.json' do
put 'Anonymize a user' do
tags 'Users', 'Admin'
consumes 'application/json'
expected_request_schema = nil
parameter name: :id, in: :path, type: :integer, required: true
produces 'application/json'
response '200', 'response' do
let(:id) { Fabricate(:user).id }
expected_response_schema = load_spec_schema('user_anonymize_response')
schema(expected_response_schema)
it_behaves_like "a JSON endpoint", 200 do
let(:expected_response_schema) { expected_response_schema }
let(:expected_request_schema) { expected_request_schema }
end
end
end
end
path '/admin/users/{id}/log_out.json' do
post 'Log a user out' do