From c7a228bf7ba1551e0df04e583a0d86644ad1b352 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 29 Aug 2018 19:32:52 -0600 Subject: [PATCH] Don't make the major version a variable We are likely to want to maintain v1 when we release a v2, so we'll avoid a variable for now. --- api/identity/associations.yaml | 2 +- api/identity/email_associations.yaml | 2 +- api/identity/invitation_signing.yaml | 2 +- api/identity/lookup.yaml | 2 +- api/identity/phone_associations.yaml | 2 +- api/identity/ping.yaml | 2 +- api/identity/pubkey.yaml | 2 +- api/identity/store_invite.yaml | 4 ++-- api/server-server/backfill.yaml | 2 +- api/server-server/event_auth.yaml | 2 +- api/server-server/events.yaml | 2 +- api/server-server/invites.yaml | 2 +- api/server-server/joins.yaml | 2 +- api/server-server/keys_query.yaml | 2 +- api/server-server/keys_server.yaml | 2 +- api/server-server/leaving.yaml | 2 +- api/server-server/openid.yaml | 2 +- api/server-server/public_rooms.yaml | 2 +- api/server-server/query.yaml | 2 +- api/server-server/third_party_invite.yaml | 2 +- api/server-server/transactions.yaml | 2 +- api/server-server/version.yaml | 2 +- scripts/gendoc.py | 3 --- specification/identity_service_api.rst | 2 +- specification/server_server_api.rst | 10 +++++----- 25 files changed, 29 insertions(+), 32 deletions(-) diff --git a/api/identity/associations.yaml b/api/identity/associations.yaml index e99ec871..4225919b 100644 --- a/api/identity/associations.yaml +++ b/api/identity/associations.yaml @@ -19,7 +19,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: diff --git a/api/identity/email_associations.yaml b/api/identity/email_associations.yaml index ef3e01ea..28f5e680 100644 --- a/api/identity/email_associations.yaml +++ b/api/identity/email_associations.yaml @@ -19,7 +19,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: diff --git a/api/identity/invitation_signing.yaml b/api/identity/invitation_signing.yaml index 3a48485b..7de62dd4 100644 --- a/api/identity/invitation_signing.yaml +++ b/api/identity/invitation_signing.yaml @@ -19,7 +19,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: diff --git a/api/identity/lookup.yaml b/api/identity/lookup.yaml index c1751644..f04436ef 100644 --- a/api/identity/lookup.yaml +++ b/api/identity/lookup.yaml @@ -21,7 +21,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: diff --git a/api/identity/phone_associations.yaml b/api/identity/phone_associations.yaml index e7991cee..f6b1bd45 100644 --- a/api/identity/phone_associations.yaml +++ b/api/identity/phone_associations.yaml @@ -19,7 +19,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: diff --git a/api/identity/ping.yaml b/api/identity/ping.yaml index b630c733..005160a3 100644 --- a/api/identity/ping.yaml +++ b/api/identity/ping.yaml @@ -23,7 +23,7 @@ basePath: /_matrix/identity produces: - application/json paths: - "/api/%IDENTITY_MAJOR_VERSION%": + "/api/v1": get: summary: Checks that an Identity server is available at this API endpopint. description: |- diff --git a/api/identity/pubkey.yaml b/api/identity/pubkey.yaml index 071564d8..9cb7c74e 100644 --- a/api/identity/pubkey.yaml +++ b/api/identity/pubkey.yaml @@ -19,7 +19,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: diff --git a/api/identity/store_invite.yaml b/api/identity/store_invite.yaml index e631d60d..1eca7198 100644 --- a/api/identity/store_invite.yaml +++ b/api/identity/store_invite.yaml @@ -19,7 +19,7 @@ host: localhost:8090 schemes: - https - http -basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% +basePath: /_matrix/identity/api/v1 produces: - application/json paths: @@ -46,7 +46,7 @@ paths: ``address`` parameter, notifying them of the invitation. Also, the generated ephemeral public key will be listed as valid on - requests to ``/_matrix/identity/api/%IDENTITY_MAJOR_VERSION%/pubkey/ephemeral/isvalid``. + requests to ``/_matrix/identity/api/v1/pubkey/ephemeral/isvalid``. operationId: storeInvite parameters: - in: body diff --git a/api/server-server/backfill.yaml b/api/server-server/backfill.yaml index 5c88f554..6b3cfaef 100644 --- a/api/server-server/backfill.yaml +++ b/api/server-server/backfill.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/event_auth.yaml b/api/server-server/event_auth.yaml index 0248fb1e..8857131f 100644 --- a/api/server-server/event_auth.yaml +++ b/api/server-server/event_auth.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/events.yaml b/api/server-server/events.yaml index 0b318373..cf3988a2 100644 --- a/api/server-server/events.yaml +++ b/api/server-server/events.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 produces: - application/json securityDefinitions: diff --git a/api/server-server/invites.yaml b/api/server-server/invites.yaml index d55ccb5b..6d905e17 100644 --- a/api/server-server/invites.yaml +++ b/api/server-server/invites.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/joins.yaml b/api/server-server/joins.yaml index 66a071e5..4902ea9e 100644 --- a/api/server-server/joins.yaml +++ b/api/server-server/joins.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/keys_query.yaml b/api/server-server/keys_query.yaml index face2bd6..e616915b 100644 --- a/api/server-server/keys_query.yaml +++ b/api/server-server/keys_query.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/key/%KEYS_MAJOR_VERSION% +basePath: /_matrix/key/v2 consumes: - application/json produces: diff --git a/api/server-server/keys_server.yaml b/api/server-server/keys_server.yaml index d09ba8e2..8734f2ed 100644 --- a/api/server-server/keys_server.yaml +++ b/api/server-server/keys_server.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/key/%KEYS_MAJOR_VERSION% +basePath: /_matrix/key/v2 produces: - application/json paths: diff --git a/api/server-server/leaving.yaml b/api/server-server/leaving.yaml index 739f4962..be08acba 100644 --- a/api/server-server/leaving.yaml +++ b/api/server-server/leaving.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/openid.yaml b/api/server-server/openid.yaml index 942a5d5e..0eac48c8 100644 --- a/api/server-server/openid.yaml +++ b/api/server-server/openid.yaml @@ -20,7 +20,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 produces: - application/json paths: diff --git a/api/server-server/public_rooms.yaml b/api/server-server/public_rooms.yaml index 98736977..b7691023 100644 --- a/api/server-server/public_rooms.yaml +++ b/api/server-server/public_rooms.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 produces: - application/json securityDefinitions: diff --git a/api/server-server/query.yaml b/api/server-server/query.yaml index af70a9c3..dc14724c 100644 --- a/api/server-server/query.yaml +++ b/api/server-server/query.yaml @@ -20,7 +20,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 produces: - application/json securityDefinitions: diff --git a/api/server-server/third_party_invite.yaml b/api/server-server/third_party_invite.yaml index 9e3bba2c..5c12247c 100644 --- a/api/server-server/third_party_invite.yaml +++ b/api/server-server/third_party_invite.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/transactions.yaml b/api/server-server/transactions.yaml index edfecac1..ad10ec0b 100644 --- a/api/server-server/transactions.yaml +++ b/api/server-server/transactions.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 consumes: - application/json produces: diff --git a/api/server-server/version.yaml b/api/server-server/version.yaml index 17110f19..19975529 100644 --- a/api/server-server/version.yaml +++ b/api/server-server/version.yaml @@ -19,7 +19,7 @@ info: host: localhost:8448 schemes: - https -basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% +basePath: /_matrix/federation/v1 produces: - application/json paths: diff --git a/scripts/gendoc.py b/scripts/gendoc.py index b7fe8155..8f5b5154 100755 --- a/scripts/gendoc.py +++ b/scripts/gendoc.py @@ -548,9 +548,6 @@ if __name__ == '__main__': # API URLs. When we have released a new major version, we'll # have to bump them. "%CLIENT_MAJOR_VERSION%": "r0", - "%SERVER_MAJOR_VERSION%": "v1", - "%IDENTITY_MAJOR_VERSION%": "v1", - "%KEYS_MAJOR_VERSION%": "v2", "%SERVER_RELEASE_LABEL%": args.server_release, "%IDENTITY_RELEASE_LABEL%": args.identity_release, "%PUSH_GATEWAY_RELEASE_LABEL%": args.push_gateway_release, diff --git a/specification/identity_service_api.rst b/specification/identity_service_api.rst index 3aa50c81..3f2eb21d 100644 --- a/specification/identity_service_api.rst +++ b/specification/identity_service_api.rst @@ -221,7 +221,7 @@ associated with a Matrix user ID. At a later point, if the owner of that particular 3pid binds it with a Matrix user ID, the identity server will attempt to make an HTTP POST to the Matrix user's homeserver which looks roughly as below:: - POST https://bar.com:8448/_matrix/federation/%SERVER_MAJOR_VERSION%/3pid/onbind + POST https://bar.com:8448/_matrix/federation/v1/3pid/onbind Content-Type: application/json { diff --git a/specification/server_server_api.rst b/specification/server_server_api.rst index f91b7179..81fe301b 100644 --- a/specification/server_server_api.rst +++ b/specification/server_server_api.rst @@ -132,8 +132,8 @@ Retrieving Server Keys specification due to lack of significance. It may be reviewed `here `_. -Each homeserver publishes its public keys under ``/_matrix/key/%KEYS_MAJOR_VERSION%/server/{keyId}``. -Homeservers query for keys by either getting ``/_matrix/key/%KEYS_MAJOR_VERSION%/server/{keyId}`` +Each homeserver publishes its public keys under ``/_matrix/key/v2/server/{keyId}``. +Homeservers query for keys by either getting ``/_matrix/key/v2/server/{keyId}`` directly or by querying an intermediate notary server using a ``/_matrix/key/v2/query/{serverName}/{keyId}`` API. Intermediate notary servers query the ``/_matrix/key/v2/server/{keyId}`` API on behalf of another server and @@ -152,7 +152,7 @@ Publishing Keys +++++++++++++++ Homeservers publish the allowed TLS fingerprints and signing keys in a JSON -object at ``/_matrix/key/%KEYS_MAJOR_VERSION%/server/{key_id}``. The response contains a list of +object at ``/_matrix/key/v2/server/{key_id}``. The response contains a list of ``verify_keys`` that are valid for signing federation requests made by the homeserver and for signing events. It contains a list of ``old_verify_keys`` which are only valid for signing events. Finally the response contains a list of TLS @@ -166,7 +166,7 @@ Querying Keys Through Another Server Servers may query another server's keys through a notary server. The notary server may be another homeserver. The notary server will retrieve keys from -the queried servers through use of the ``/_matrix/key/%KEYS_MAJOR_VERSION%/server/{keyId}`` +the queried servers through use of the ``/_matrix/key/v2/server/{keyId}`` API. The notary server will additionally sign the response from the queried server before returning the results. @@ -1115,7 +1115,7 @@ that are too long. known hash functions like SHA-256 when none of the keys have been redacted]] .. |/query/directory| replace:: ``/query/directory`` -.. _/query/directory: #get-matrix-federation-%SERVER_MAJOR_VERSION%-query-directory +.. _/query/directory: #get-matrix-federation-v1-query-directory .. _`Invitation storage`: ../identity_service/%IDENTITY_RELEASE_LABEL%.html#invitation-storage .. _`Identity Service API`: ../identity_service/%IDENTITY_RELEASE_LABEL%.html