various minor fixes

- formatting fixes
- add examples to homeserver/identity server discovery schema
- replace DNS name with hostname
This commit is contained in:
Hubert Chathi 2018-08-14 17:58:57 -04:00
parent 6a3cf10be9
commit fcca80dad8
4 changed files with 19 additions and 17 deletions

View file

@ -19,5 +19,6 @@ properties:
base_url: base_url:
type: string type: string
description: The base URL for the homeserver for client-server connections. description: The base URL for the homeserver for client-server connections.
example: https://matrix.example.com
required: required:
- base_url - base_url

View file

@ -19,5 +19,6 @@ properties:
base_url: base_url:
type: string type: string
description: The base URL for the identity server for client-server connections. description: The base URL for the identity server for client-server connections.
example: https://identity.example.com
required: required:
- base_url - base_url

View file

@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
swagger: '2.0' swagger: '2.0'
info: info:
title: "Matrix Client-Server server discovery API" title: "Matrix Client-Server Server Discovery API"
version: "1.0.0" version: "1.0.0"
host: localhost:8008 host: localhost:8008
schemes: schemes:
@ -37,7 +37,7 @@ paths:
operationId: getWellknown operationId: getWellknown
responses: responses:
200: 200:
description: Server discovery information description: Server discovery information.
examples: examples:
application/json: { application/json: {
"m.homeserver": { "m.homeserver": {
@ -61,6 +61,6 @@ paths:
required: required:
- m.homeserver - m.homeserver
404: 404:
description: No server discovery information available description: No server discovery information available.
tags: tags:
- Server administration - Server administration

View file

@ -223,8 +223,8 @@ specify parameter values. The flow for this method is as follows:
1. Extract the server name from the user's Matrix ID by splitting the Matrix ID 1. Extract the server name from the user's Matrix ID by splitting the Matrix ID
at the first colon. at the first colon.
2. Extract the DNS name from the server name. 2. Extract the hostname from the server name.
3. Make a GET request to ``https://dns_name/.well-known/matrix/client``. 3. Make a GET request to ``https://hostname/.well-known/matrix/client``.
a. If the returned status code is 404, then ``IGNORE``. a. If the returned status code is 404, then ``IGNORE``.
b. If the returned status code is not 200, or the response body is empty, b. If the returned status code is not 200, or the response body is empty,