mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 10:59:16 +01:00
feat: ✨ Add version discovery system
This commit is contained in:
parent
f2a09a457f
commit
0bd532be3e
8 changed files with 82 additions and 7 deletions
|
|
@ -5,6 +5,58 @@ export const metadata = {
|
|||
|
||||
# Endpoints
|
||||
|
||||
## Well-known
|
||||
|
||||
<Warning>
|
||||
This endpoint is exempt from the signature requirement. No signatures are required for requests or responses to it.
|
||||
|
||||
The following `Accept` headers are also allowed for requests to this endpoint:
|
||||
- `application/jrd+json`
|
||||
- `application/json`
|
||||
</Warning>
|
||||
|
||||
<Row>
|
||||
<Col>
|
||||
|
||||
<Properties name="Well-known">
|
||||
<Property name="endpoint">
|
||||
Must be `/.well-known/versia`.
|
||||
</Property>
|
||||
<Property name="method">
|
||||
Must be `GET`.
|
||||
</Property>
|
||||
<Property name="response">
|
||||
A small JSON object with a single attribute:
|
||||
|
||||
- `versions`: Supported Versia Protocol versions.
|
||||
- Versions marked as "Working Draft X" are represented as `0.X`.
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
</Col>
|
||||
<Col sticky>
|
||||
|
||||
```http {{ 'title': 'Example request' }}
|
||||
GET /.well-known/versia
|
||||
Host: b.social
|
||||
Accept: application/jrd+json
|
||||
```
|
||||
|
||||
```http {{ 'title': 'Example response' }}
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/jrd+json
|
||||
|
||||
{
|
||||
"versions": [
|
||||
"0.6.0",
|
||||
"0.5.0"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
## Instance metadata
|
||||
|
||||
<Warning>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue