mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Refactor the api docs for the user endpoint (#14377)
Due to the way that rswag expands shared components we were getting this warning when linting our api docs: ``` Component: "user_response" is never used. ``` This change refactors the `api/users_spec.rb` file so that it uses the new way of doing things with a separate `user_get_response.json` schema file rather then the old way of loading a shared response inside of the swagger_helper.rb file.
This commit is contained in:
22
spec/requests/api/schemas/json/user_create_response.json
Normal file
22
spec/requests/api/schemas/json/user_create_response.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"success",
|
||||
"active",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user