Skip to content

Commit 666689e

Browse files
authored
Merge pull request #493 from abraham/update-schema
Update docs SHA and regenerate OpenAPI schema
2 parents d58b6dd + 8456669 commit 666689e

File tree

3 files changed

+192
-3
lines changed

3 files changed

+192
-3
lines changed

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"mastodonDocsCommit": "2667d6c3923255514561862139dea336c479ce2f",
2+
"mastodonDocsCommit": "f760ffcdf3371a641ba5d731dd33348fc6eb4fe6",
33
"mastodonVersion": "4.4.0",
44
"minimumMastodonVersion": "4.2.0",
55
"blockedFiles": ["methods/notifications_alpha.md"]

dist/schema.json

Lines changed: 190 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Mastodon API",
55
"version": "4.4.0",
6-
"description": "Unofficial documentation for the Mastodon API. Generated with [mastodon-openapi](https://github.com/abraham/mastodon-openapi) from [2667d6c](https://github.com/mastodon/documentation/commit/2667d6c3923255514561862139dea336c479ce2f).",
6+
"description": "Unofficial documentation for the Mastodon API. Generated with [mastodon-openapi](https://github.com/abraham/mastodon-openapi) from [f760ffc](https://github.com/mastodon/documentation/commit/f760ffcdf3371a641ba5d731dd33348fc6eb4fe6).",
77
"license": {
88
"name": "GFDL-1.3",
99
"url": "https://www.gnu.org/licenses/fdl-1.3.en.html"
@@ -5542,6 +5542,149 @@
55425542
]
55435543
}
55445544
},
5545+
"/api/v1_alpha/async_refreshes/{id}": {
5546+
"get": {
5547+
"operationId": "getAsyncRefreshV1Alpha",
5548+
"summary": "Get Status of Async Refresh",
5549+
"description": "Sometimes an API request might not return the expected results or not all possible results as either a background job is already running to (re-)create these results or the request triggers a background job to create or fetch results.\n\nVersion history:\n\n4.4.0 - added",
5550+
"tags": [
5551+
"async_refreshes"
5552+
],
5553+
"responses": {
5554+
"200": {
5555+
"description": "[AsyncRefresh]",
5556+
"headers": {
5557+
"X-RateLimit-Limit": {
5558+
"description": "Number of requests permitted per time period",
5559+
"schema": {
5560+
"type": "integer"
5561+
}
5562+
},
5563+
"X-RateLimit-Remaining": {
5564+
"description": "Number of requests you can still make",
5565+
"schema": {
5566+
"type": "integer"
5567+
}
5568+
},
5569+
"X-RateLimit-Reset": {
5570+
"description": "Timestamp when your rate limit will reset",
5571+
"schema": {
5572+
"type": "string",
5573+
"format": "date-time"
5574+
}
5575+
}
5576+
},
5577+
"content": {
5578+
"application/json": {
5579+
"schema": {
5580+
"$ref": "#/components/schemas/AsyncRefresh"
5581+
}
5582+
}
5583+
}
5584+
},
5585+
"401": {
5586+
"description": "Unauthorized",
5587+
"content": {
5588+
"application/json": {
5589+
"schema": {
5590+
"$ref": "#/components/schemas/Error"
5591+
},
5592+
"examples": {
5593+
"Error401Example": {
5594+
"$ref": "#/components/examples/Error401Example"
5595+
}
5596+
}
5597+
}
5598+
}
5599+
},
5600+
"404": {
5601+
"description": "Not Found",
5602+
"content": {
5603+
"application/json": {
5604+
"schema": {
5605+
"$ref": "#/components/schemas/Error"
5606+
},
5607+
"examples": {
5608+
"Error404Example": {
5609+
"$ref": "#/components/examples/Error404Example"
5610+
}
5611+
}
5612+
}
5613+
}
5614+
},
5615+
"410": {
5616+
"description": "Gone"
5617+
},
5618+
"422": {
5619+
"description": "Unprocessable Content",
5620+
"content": {
5621+
"application/json": {
5622+
"schema": {
5623+
"$ref": "#/components/schemas/ValidationError"
5624+
},
5625+
"examples": {
5626+
"ValidationError422Example": {
5627+
"$ref": "#/components/examples/ValidationError422Example"
5628+
}
5629+
}
5630+
}
5631+
}
5632+
},
5633+
"429": {
5634+
"description": "Too Many Requests",
5635+
"content": {
5636+
"application/json": {
5637+
"schema": {
5638+
"$ref": "#/components/schemas/Error"
5639+
},
5640+
"examples": {
5641+
"Error429Example": {
5642+
"$ref": "#/components/examples/Error429Example"
5643+
}
5644+
}
5645+
}
5646+
}
5647+
},
5648+
"503": {
5649+
"description": "Unavailable",
5650+
"content": {
5651+
"application/json": {
5652+
"schema": {
5653+
"$ref": "#/components/schemas/Error"
5654+
},
5655+
"examples": {
5656+
"Error503Example": {
5657+
"$ref": "#/components/examples/Error503Example"
5658+
}
5659+
}
5660+
}
5661+
}
5662+
}
5663+
},
5664+
"externalDocs": {
5665+
"url": "https://docs.joinmastodon.org/methods/async_refreshes/#show",
5666+
"description": "Official Mastodon API documentation"
5667+
},
5668+
"security": [
5669+
{
5670+
"OAuth2ClientCredentials": [
5671+
"read"
5672+
]
5673+
}
5674+
],
5675+
"parameters": [
5676+
{
5677+
"name": "id",
5678+
"in": "path",
5679+
"required": true,
5680+
"description": "id parameter",
5681+
"schema": {
5682+
"type": "string"
5683+
}
5684+
}
5685+
]
5686+
}
5687+
},
55455688
"/api/v1/blocks": {
55465689
"get": {
55475690
"operationId": "getBlocks",
@@ -33457,6 +33600,45 @@
3345733600
"description": "Official Mastodon API documentation"
3345833601
}
3345933602
},
33603+
"AsyncRefresh": {
33604+
"type": "object",
33605+
"description": "Status of an asynchronous refresh.",
33606+
"properties": {
33607+
"id": {
33608+
"description": "The ID of the async refresh",
33609+
"type": [
33610+
"string",
33611+
"null"
33612+
]
33613+
},
33614+
"result_count": {
33615+
"description": "Optional number of results already created/fetched as part of this async refresh.",
33616+
"type": [
33617+
"integer",
33618+
"null"
33619+
]
33620+
},
33621+
"status": {
33622+
"description": "Status of the async refresh.",
33623+
"type": [
33624+
"string",
33625+
"null"
33626+
],
33627+
"$ref": "#/components/schemas/AsyncRefreshStatusEnum"
33628+
}
33629+
},
33630+
"externalDocs": {
33631+
"url": "https://docs.joinmastodon.org/entities/AsyncRefresh/#attributes",
33632+
"description": "Official Mastodon API documentation"
33633+
},
33634+
"example": {
33635+
"async_refresh": {
33636+
"id": "ImNvbnRleHQ6MTEzNjQwNTczMzAzNzg1MTc4OnJlZnJlc2gi--c526259eb4a1f3ef0d4b91cf8c99bf501330a815",
33637+
"status": "running",
33638+
"result_count": 2
33639+
}
33640+
}
33641+
},
3346033642
"Context": {
3346133643
"type": "object",
3346233644
"description": "Represents the tree around a given status. Used for reconstructing threads of statuses.",
@@ -38891,6 +39073,13 @@
3889139073
"pending"
3889239074
]
3889339075
},
39076+
"AsyncRefreshStatusEnum": {
39077+
"type": "string",
39078+
"enum": [
39079+
"running",
39080+
"finished"
39081+
]
39082+
},
3889439083
"DomainBlockSeverityEnum": {
3889539084
"type": "string",
3889639085
"enum": [

src/__tests__/parsers/EntityParser.draft.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ describe('EntityParser - Draft File Handling', () => {
4040
// This test validates that only explicit draft: true is filtered
4141
// This is implicitly tested by checking that we still get a reasonable number of entities
4242
const entities = parser.parseAllEntities();
43-
expect(entities.length).toBe(90); // Exact count after removing EncryptedMessage and entities from blocked files (increased due to extracted nested entities + Admin::DimensionData + DiscoverOauthServerConfigurationResponse + OEmbedResponse)
43+
expect(entities.length).toBe(91); // Exact count after removing EncryptedMessage and entities from blocked files (increased due to extracted nested entities + Admin::DimensionData + DiscoverOauthServerConfigurationResponse + OEmbedResponse)
4444
});
4545
});

0 commit comments

Comments
 (0)