mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 02:43:44 +08:00
febc2361bd
* DEV: Document external topic id endpoints
This commit documents the existing Create Topic endpoint with the
`external_id` param and documents the new get topic by external id
endpoint.
It also refactors the existing topic show endpoint to use the new format
where we load the expected json schema response from a file.
See: 71f7f7ed49
* clean up unused test variables
50 lines
1.4 KiB
JSON
50 lines
1.4 KiB
JSON
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Required if creating a new topic or new private message."
|
|
},
|
|
"raw": {
|
|
"type": "string"
|
|
},
|
|
"topic_id": {
|
|
"type": "integer",
|
|
"description": "Required if creating a new post."
|
|
},
|
|
"category": {
|
|
"type": "integer",
|
|
"description": "Optional if creating a new topic, and ignored if creating a new post."
|
|
},
|
|
"target_recipients": {
|
|
"type": "string",
|
|
"description": "Required for private message, comma separated.",
|
|
"example": "blake,sam"
|
|
},
|
|
"target_usernames": {
|
|
"type": "string",
|
|
"description": "Deprecated. Use target_recipients instead.",
|
|
"deprecated": true
|
|
},
|
|
"archetype": {
|
|
"type": "string",
|
|
"description": "Required for new private message.",
|
|
"example": "private_message"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"embed_url": {
|
|
"type": "string",
|
|
"description": "Provide a URL from a remote system to associate a forum topic with that URL, typically for using Discourse as a comments system for an external blog."
|
|
},
|
|
"external_id": {
|
|
"type": "string",
|
|
"description": "Provide an external_id from a remote system to associate a forum topic with that id."
|
|
}
|
|
},
|
|
"required": [
|
|
"raw"
|
|
]
|
|
}
|