From fba61941af471e885fb2310ddb443660e92f0929 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Sun, 9 Jun 2019 20:02:57 +0100 Subject: [PATCH] Move submit_url responses to ref --- api/client-server/administrative_contact.yaml | 41 +--------- api/client-server/registration.yaml | 80 +------------------ api/identity/definitions/sid.yaml | 14 ++++ 3 files changed, 20 insertions(+), 115 deletions(-) diff --git a/api/client-server/administrative_contact.yaml b/api/client-server/administrative_contact.yaml index 99451294..d26e5a96 100644 --- a/api/client-server/administrative_contact.yaml +++ b/api/client-server/administrative_contact.yaml @@ -261,25 +261,7 @@ paths: Note that this may be an email containing the validation token or it may be informing the user of an error. schema: - type: object - allOf: - - $ref: "../identity/definitions/sid.yaml" - - type: object - properties: - submit_url: - type: string - description: |- - An optional field containing a URL where the client must - submit the validation token to, with identical parameters - to the Identity Service API's - ``/validate/email/submitToken`` endpoint. The homeserver - must send this token to the user, which should then be - prompted to provide it to the client. - - If this field is not present, the client can assume that - verification will happen without the client's - involvement. - example: "https://example.org/path/to/submitToken" + - $ref: "../identity/definitions/sid.yaml" 403: description: |- The homeserver does not allow the third party identifier as a @@ -336,26 +318,7 @@ paths: description: |- A SMS message was sent to the given phone number. schema: - type: object - allOf: - - $ref: "../identity/definitions/sid.yaml" - - type: object - properties: - submit_url: - type: string - description: |- - An optional field containing a URL where the client must - submit the validation token to, with identical parameters - to the Identity Service API's - ``/validate/email/submitToken`` endpoint. The homeserver - must send this token to the user (if applicable), which - should then be prompted to provide it to the client. - - If this field is not present, the client can assume that - verification will happen without the client's - involvement. - example: "https://example.org/path/to/submitToken" - + - $ref: "../identity/definitions/sid.yaml" 403: description: |- The homeserver does not allow the third party identifier as a diff --git a/api/client-server/registration.yaml b/api/client-server/registration.yaml index 21626815..a2a0d47f 100644 --- a/api/client-server/registration.yaml +++ b/api/client-server/registration.yaml @@ -241,25 +241,7 @@ paths: Note that this may be an email containing the validation token or it may be informing the user of an error. schema: - type: object - allOf: - - $ref: "../identity/definitions/sid.yaml" - - type: object - properties: - submit_url: - type: string - description: |- - An optional field containing a URL where the client must - submit the validation token to, with identical parameters - to the Identity Service API's - ``/validate/email/submitToken`` endpoint. The homeserver - must send this token to the user (if applicable), which - should then be prompted to provide it to the client. - - If this field is not present, the client can assume that - verification will happen without the client's - involvement. - example: "https://example.org/path/to/submitToken" + - $ref: "../identity/definitions/sid.yaml" 403: description: The homeserver does not permit the address to be bound. schema: @@ -322,25 +304,7 @@ paths: that this may be an SMS message containing the validation token or it may be informing the user of an error. schema: - type: object - allOf: - - $ref: "../identity/definitions/sid.yaml" - - type: object - properties: - submit_url: - type: string - description: |- - An optional field containing a URL where the client must - submit the validation token to, with identical parameters - to the Identity Service API's - ``/validate/email/submitToken`` endpoint. The homeserver - must send this token to the user (if applicable), which - should then be prompted to provide it to the client. - - If this field is not present, the client can assume that - verification will happen without the client's - involvement. - example: "https://example.org/path/to/submitToken" + - $ref: "../identity/definitions/sid.yaml" 403: description: The homeserver does not permit the address to be bound. schema: @@ -469,25 +433,7 @@ paths: 200: description: An email was sent to the given address. schema: - type: object - allOf: - - $ref: "../identity/definitions/sid.yaml" - - type: object - properties: - submit_url: - type: string - description: |- - An optional field containing a URL where the client must - submit the validation token to, with identical parameters - to the Identity Service API's - ``/validate/email/submitToken`` endpoint. The homeserver - must send this token to the user (if applicable), which - should then be prompted to provide it to the client. - - If this field is not present, the client can assume that - verification will happen without the client's - involvement. - example: "https://example.org/path/to/submitToken" + - $ref: "../identity/definitions/sid.yaml" 403: description: |- The homeserver does not allow the third party identifier as a @@ -557,25 +503,7 @@ paths: 200: description: A SMS message was sent to the given phone number. schema: - type: object - allOf: - - $ref: "../identity/definitions/sid.yaml" - - type: object - properties: - submit_url: - type: string - description: |- - An optional field containing a URL where the client must - submit the validation token to, with identical parameters - to the Identity Service API's - ``/validate/msisdn/submitToken`` endpoint. The homeserver - must send this token to the user (if applicable), which - should then be prompted to provide it to the client. - - If this field is not present, the client can assume that - verification will happen without the client's - involvement. - example: "https://example.org/path/to/submitToken" + - $ref: "../identity/definitions/sid.yaml" 403: description: |- The homeserver does not allow the third party identifier as a diff --git a/api/identity/definitions/sid.yaml b/api/identity/definitions/sid.yaml index c1f1ae64..c09ed395 100644 --- a/api/identity/definitions/sid.yaml +++ b/api/identity/definitions/sid.yaml @@ -21,4 +21,18 @@ properties: ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and they must not be empty. example: "123abc" + submit_url: + type: string + description: |- + An optional field containing a URL where the client must + submit the validation token to, with identical parameters + to the Identity Service API's + ``/validate/email/submitToken`` endpoint. The homeserver + must send this token to the user (if applicable), which + should then be prompted to provide it to the client. + + If this field is not present, the client can assume that + verification will happen without the client's + involvement. + example: "https://example.org/path/to/submitToken" required: ['sid']