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.
This commit is contained in:
Travis Ralston 2018-08-29 19:32:52 -06:00
parent e7a69a6a6d
commit c7a228bf7b
25 changed files with 29 additions and 32 deletions

View file

@ -19,7 +19,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -19,7 +19,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -19,7 +19,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -21,7 +21,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -19,7 +19,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -23,7 +23,7 @@ basePath: /_matrix/identity
produces: produces:
- application/json - application/json
paths: paths:
"/api/%IDENTITY_MAJOR_VERSION%": "/api/v1":
get: get:
summary: Checks that an Identity server is available at this API endpopint. summary: Checks that an Identity server is available at this API endpopint.
description: |- description: |-

View file

@ -19,7 +19,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -19,7 +19,7 @@ host: localhost:8090
schemes: schemes:
- https - https
- http - http
basePath: /_matrix/identity/api/%IDENTITY_MAJOR_VERSION% basePath: /_matrix/identity/api/v1
produces: produces:
- application/json - application/json
paths: paths:
@ -46,7 +46,7 @@ paths:
``address`` parameter, notifying them of the invitation. ``address`` parameter, notifying them of the invitation.
Also, the generated ephemeral public key will be listed as valid on 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 operationId: storeInvite
parameters: parameters:
- in: body - in: body

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
securityDefinitions: securityDefinitions:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/key/%KEYS_MAJOR_VERSION% basePath: /_matrix/key/v2
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/key/%KEYS_MAJOR_VERSION% basePath: /_matrix/key/v2
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -20,7 +20,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
securityDefinitions: securityDefinitions:

View file

@ -20,7 +20,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
securityDefinitions: securityDefinitions:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
consumes: consumes:
- application/json - application/json
produces: produces:

View file

@ -19,7 +19,7 @@ info:
host: localhost:8448 host: localhost:8448
schemes: schemes:
- https - https
basePath: /_matrix/federation/%SERVER_MAJOR_VERSION% basePath: /_matrix/federation/v1
produces: produces:
- application/json - application/json
paths: paths:

View file

@ -548,9 +548,6 @@ if __name__ == '__main__':
# API URLs. When we have released a new major version, we'll # API URLs. When we have released a new major version, we'll
# have to bump them. # have to bump them.
"%CLIENT_MAJOR_VERSION%": "r0", "%CLIENT_MAJOR_VERSION%": "r0",
"%SERVER_MAJOR_VERSION%": "v1",
"%IDENTITY_MAJOR_VERSION%": "v1",
"%KEYS_MAJOR_VERSION%": "v2",
"%SERVER_RELEASE_LABEL%": args.server_release, "%SERVER_RELEASE_LABEL%": args.server_release,
"%IDENTITY_RELEASE_LABEL%": args.identity_release, "%IDENTITY_RELEASE_LABEL%": args.identity_release,
"%PUSH_GATEWAY_RELEASE_LABEL%": args.push_gateway_release, "%PUSH_GATEWAY_RELEASE_LABEL%": args.push_gateway_release,

View file

@ -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:: 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 Content-Type: application/json
{ {

View file

@ -132,8 +132,8 @@ Retrieving Server Keys
specification due to lack of significance. It may be reviewed `here specification due to lack of significance. It may be reviewed `here
<https://github.com/matrix-org/matrix-doc/blob/51faf8ed2e4a63d4cfd6d23183698ed169956cc0/specification/server_server_api.rst#232version-1>`_. <https://github.com/matrix-org/matrix-doc/blob/51faf8ed2e4a63d4cfd6d23183698ed169956cc0/specification/server_server_api.rst#232version-1>`_.
Each homeserver publishes its public keys under ``/_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/%KEYS_MAJOR_VERSION%/server/{keyId}`` Homeservers query for keys by either getting ``/_matrix/key/v2/server/{keyId}``
directly or by querying an intermediate notary server using a directly or by querying an intermediate notary server using a
``/_matrix/key/v2/query/{serverName}/{keyId}`` API. Intermediate notary servers ``/_matrix/key/v2/query/{serverName}/{keyId}`` API. Intermediate notary servers
query the ``/_matrix/key/v2/server/{keyId}`` API on behalf of another server and 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 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 ``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 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 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 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 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 API. The notary server will additionally sign the response from the queried
server before returning the results. 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]] known hash functions like SHA-256 when none of the keys have been redacted]]
.. |/query/directory| replace:: ``/query/directory`` .. |/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 .. _`Invitation storage`: ../identity_service/%IDENTITY_RELEASE_LABEL%.html#invitation-storage
.. _`Identity Service API`: ../identity_service/%IDENTITY_RELEASE_LABEL%.html .. _`Identity Service API`: ../identity_service/%IDENTITY_RELEASE_LABEL%.html