c2s: clean up $ref objects

* Most of the changes: align to the $ref object definition
  (https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3)
  that says that any attribute other than $ref be ignored.
* Remove extraneous leading ./ in $ref paths
* Fix an apparent typo in registration.yaml:
  /account/password/msisdn/requestToken used a file from ../identity/*
  instead of its c2s namesake.
pull/977/head
Kitsune Ral 5 years ago
parent c72d30513e
commit 6cfb94562e

@ -201,10 +201,11 @@ paths:
type: object type: object
properties: properties:
auth: auth:
description: |- allOf:
- description: |-
Additional authentication information for the Additional authentication information for the
user-interactive authentication API. user-interactive authentication API.
$ref: "definitions/auth_data.yaml" - $ref: "definitions/auth_data.yaml"
client_secret: client_secret:
type: string type: string
description: The client secret used in the session with the homeserver. description: The client secret used in the session with the homeserver.
@ -432,7 +433,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: "./definitions/request_email_validation.yaml" $ref: "definitions/request_email_validation.yaml"
responses: responses:
200: 200:
description: |- description: |-
@ -482,7 +483,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: "./definitions/request_msisdn_validation.yaml" $ref: "definitions/request_msisdn_validation.yaml"
responses: responses:
200: 200:
description: An SMS message was sent to the given phone number. description: An SMS message was sent to the given phone number.

@ -160,7 +160,8 @@ paths:
description: |- description: |-
Additional authentication information for the Additional authentication information for the
user-interactive authentication API. user-interactive authentication API.
"$ref": "definitions/auth_data.yaml" allOf:
- "$ref": "definitions/auth_data.yaml"
responses: responses:
200: 200:
description: |- description: |-
@ -203,10 +204,11 @@ paths:
description: A list of device IDs. description: A list of device IDs.
example: ["QBUAZIFURK", "AUIECTSRND"] example: ["QBUAZIFURK", "AUIECTSRND"]
auth: auth:
allOf:
- "$ref": "definitions/auth_data.yaml"
description: |- description: |-
Additional authentication information for the Additional authentication information for the
user-interactive authentication API. user-interactive authentication API.
"$ref": "definitions/auth_data.yaml"
required: required:
- devices - devices
responses: responses:

@ -100,7 +100,6 @@ paths:
enum: ["m.login.password", "m.login.token"] enum: ["m.login.password", "m.login.token"]
description: The login type being used. description: The login type being used.
identifier: identifier:
description: Identification information for the user.
"$ref": "definitions/user_identifier.yaml" "$ref": "definitions/user_identifier.yaml"
user: user:
type: string type: string
@ -176,13 +175,14 @@ paths:
ID of the logged-in device. Will be the same as the ID of the logged-in device. Will be the same as the
corresponding parameter in the request, if one was specified. corresponding parameter in the request, if one was specified.
well_known: well_known:
type: object allOf:
- type: object
description: |- description: |-
Optional client configuration provided by the server. If present, Optional client configuration provided by the server. If present,
clients SHOULD use the provided object to reconfigure themselves, clients SHOULD use the provided object to reconfigure themselves,
optionally validating the URLs within. This object takes the same optionally validating the URLs within. This object takes the same
form as the one returned from .well-known autodiscovery. form as the one returned from .well-known autodiscovery.
"$ref": "definitions/wellknown/full.yaml" - "$ref": "definitions/wellknown/full.yaml"
400: 400:
description: |- description: |-
Part of the request was invalid. For example, the login type may not be recognised. Part of the request was invalid. For example, the login type may not be recognised.

@ -89,13 +89,14 @@ paths:
type: object type: object
properties: properties:
auth: auth:
description: |- allOf:
- description: |-
Additional authentication information for the Additional authentication information for the
user-interactive authentication API. Note that this user-interactive authentication API. Note that this
information is *not* used to define how the registered user information is *not* used to define how the registered user
should be authenticated, but is instead used to should be authenticated, but is instead used to
authenticate the ``register`` call itself. authenticate the ``register`` call itself.
"$ref": "definitions/auth_data.yaml" - "$ref": "definitions/auth_data.yaml"
username: username:
type: string type: string
description: |- description: |-
@ -228,7 +229,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: "./definitions/request_email_validation.yaml" $ref: "definitions/request_email_validation.yaml"
responses: responses:
200: 200:
description: |- description: |-
@ -278,7 +279,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: "./definitions/request_msisdn_validation.yaml" $ref: "definitions/request_msisdn_validation.yaml"
responses: responses:
200: 200:
description: |- description: |-
@ -346,9 +347,10 @@ paths:
description: The new password for the account. description: The new password for the account.
example: "ihatebananas" example: "ihatebananas"
auth: auth:
description: |- allOf:
- description: |-
Additional authentication information for the user-interactive authentication API. Additional authentication information for the user-interactive authentication API.
"$ref": "definitions/auth_data.yaml" - "$ref": "definitions/auth_data.yaml"
required: ["new_password"] required: ["new_password"]
responses: responses:
200: 200:
@ -397,7 +399,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: "./definitions/request_email_validation.yaml" $ref: "definitions/request_email_validation.yaml"
responses: responses:
200: 200:
description: An email was sent to the given address. description: An email was sent to the given address.
@ -455,7 +457,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: "../identity/definitions/request_msisdn_validation.yaml" $ref: "definitions/request_msisdn_validation.yaml"
responses: responses:
200: 200:
description: An SMS message was sent to the given phone number. description: An SMS message was sent to the given phone number.
@ -516,7 +518,8 @@ paths:
auth: auth:
description: |- description: |-
Additional authentication information for the user-interactive authentication API. Additional authentication information for the user-interactive authentication API.
"$ref": "definitions/auth_data.yaml" allOf:
- $ref: "definitions/auth_data.yaml"
id_server: id_server:
type: string type: string
description: |- description: |-

@ -96,7 +96,8 @@ paths:
# for now :/ # for now :/
description: |- description: |-
This takes a `filter`_. This takes a `filter`_.
$ref: "definitions/room_event_filter.yaml" allOf:
- $ref: "definitions/room_event_filter.yaml"
order_by: order_by:
title: "Ordering" title: "Ordering"
type: string type: string

@ -39,7 +39,6 @@ paths:
200: 200:
description: Server discovery information. description: Server discovery information.
schema: schema:
type: object
"$ref": "definitions/wellknown/full.yaml" "$ref": "definitions/wellknown/full.yaml"
404: 404:
description: No server discovery information available. description: No server discovery information available.

Loading…
Cancel
Save