Skip to content

Commit

Permalink
spec: fix subscriptions URL
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jul 7, 2020
1 parent e360200 commit 87ae06f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions spec/mercure.md
Expand Up @@ -531,11 +531,11 @@ date.

The web API **MUST** expose endpoints following these patterns:

* `/.well-known/subscriptions`: the collection of subscriptions
* `/.well-known/mercure/subscriptions`: the collection of subscriptions

* `/.well-known/subscriptions/{topic}`: the collection subscriptions for the given topic selector
* `/.well-known/mercure/subscriptions/{topic}`: the collection subscriptions for the given topic selector

* `/.well-known/subscriptions/{topic}/{subscriber}`: a specific subscription
* `/.well-known/mercure/subscriptions/{topic}/{subscriber}`: a specific subscription

To access to the URLs exposed by the web API, clients **MUST** be authorized according to the rules
defined in (#authorization). The requested URL **MUST** match at least one of the topic selectors
Expand All @@ -544,7 +544,7 @@ provided in the `mercure.subscribe` key of the JWS.
The web API **MUST** set the `Content-Type` HTTP header to `application/ld+json`.

URLs returning a single subscription (following the pattern
`/.well-known/subscriptions/{topic}/{subscriber}`) **MUST** expose the same JSON-LD document as
`/.well-known/mercure/subscriptions/{topic}/{subscriber}`) **MUST** expose the same JSON-LD document as
described in (#subscription-events). If the requested subscription does not exist, a `404` status
code **MUST** be returned.

Expand Down Expand Up @@ -578,7 +578,7 @@ from cache is still valid before using it.
Examples:

~~~ http
GET /.well-known/subscriptions HTTP/1.1
GET /.well-known/mercure/subscriptions HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Expand All @@ -589,7 +589,7 @@ Cache-control: must-revalidate
{
"@context": "https://mercure.rocks/",
"id": "/.well-known/subscriptions",
"id": "/.well-known/mercure/subscriptions",
"type": "Subscriptions",
"lastEventID": "urn:uuid:5e94c686-2c0b-4f9b-958c-92ccc3bbb4eb",
"subscriptions": [
Expand Down Expand Up @@ -622,7 +622,7 @@ Cache-control: must-revalidate
~~~

~~~ http
GET /.well-known/subscriptions/https%3A%2F%2Fexample.com%2F%7Bselector%7D HTTP/1.1
GET /.well-known/mercure/subscriptions/https%3A%2F%2Fexample.com%2F%7Bselector%7D HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Expand All @@ -633,7 +633,7 @@ Cache-control: must-revalidate
{
"@context": "https://mercure.rocks/",
"id": "/.well-known/subscriptions/https%3A%2F%2Fexample.com%2F%7Bselector%7D",
"id": "/.well-known/mercure/subscriptions/https%3A%2F%2Fexample.com%2F%7Bselector%7D",
"type": "Subscriptions",
"lastEventID": "urn:uuid:5e94c686-2c0b-4f9b-958c-92ccc3bbb4eb",
"subscriptions": [
Expand Down
4 changes: 2 additions & 2 deletions spec/openapi.yaml
Expand Up @@ -163,7 +163,7 @@ components:
id:
type: string
format: iri-reference
example: /.well-known/subscriptions
example: /.well-known/mercure/subscriptions
type:
type: string
format: iri-reference
Expand All @@ -186,7 +186,7 @@ components:
id:
type: string
format: iri-reference
example: /.well-known/subscriptions
example: /criptions
type:
type: string
format: iri-reference
Expand Down

0 comments on commit 87ae06f

Please sign in to comment.