mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:52:45 +08:00
DEV: Document basic-info endpoint (#26471)
This commit is contained in:
parent
797ab30d95
commit
8b1b368693
47
spec/requests/api/schemas/json/site_basic_info_response.json
Normal file
47
spec/requests/api/schemas/json/site_basic_info_response.json
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"logo_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"logo_small_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"apple_touch_icon_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"favicon_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"header_primary_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"header_background_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"login_required": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"mobile_logo_url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"logo_url",
|
||||
"logo_small_url",
|
||||
"apple_touch_icon_url",
|
||||
"favicon_url",
|
||||
"title",
|
||||
"description",
|
||||
"header_primary_color",
|
||||
"header_background_color",
|
||||
"login_required",
|
||||
"mobile_logo_url"
|
||||
]
|
||||
}
|
|
@ -37,4 +37,25 @@ RSpec.describe "site" do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
path "/site/basic-info.json" do
|
||||
get "Get site basic info" do
|
||||
tags "Site"
|
||||
operationId "getSiteBasicInfo"
|
||||
description "Can be used to fetch basic info about a site"
|
||||
consumes "application/json"
|
||||
expected_request_schema = nil
|
||||
|
||||
produces "application/json"
|
||||
response "200", "success response" do
|
||||
expected_response_schema = load_spec_schema("site_basic_info_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
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user