From 20d135ab9a3a7925236bfefdcecc6a8855153547 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:23:52 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=82=A8=E3=83=B3=E3=83=89=E3=83=9D?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=88=20/api/v1/instance/*=E3=81=A8=20/ap?= =?UTF-8?q?i/v2/instance=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/openapi/mastodon.yaml | 127 ++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/src/main/resources/openapi/mastodon.yaml b/src/main/resources/openapi/mastodon.yaml index eabfc2c5..47dea8e6 100644 --- a/src/main/resources/openapi/mastodon.yaml +++ b/src/main/resources/openapi/mastodon.yaml @@ -6,7 +6,97 @@ info: servers: - url: 'https://test-hideout.usbharu.dev' paths: + /api/v2/instance: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + $ref: "#/components/schemas/Instance" + /api/v1/instance/peers: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + type: array + items: + type: string + + /api/v1/instance/activity: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/V1InstanceActivity" + + /api/v1/instance/rules: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Rule" + + /api/v1/instance/domain_blocks: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/DomainBlock" + + /api/v1/instance/extended_description: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + $ref: "#/components/schemas/ExtendedDescription" + + /api/v1/instance: + get: + security: + - { } + responses: + 200: + description: 成功 + content: + application/json: + schema: + $ref: "#/components/schemas/V1Instance" components: schemas: Account: @@ -609,7 +699,7 @@ components: invites_enabled: type: boolean configuration: - $ref: "" + $ref: "#/components/schemas/V1InstanceConfiguration" V1InstanceUrls: type: object @@ -690,3 +780,38 @@ components: type: integer max_expiration: type: integer + + V1InstanceActivity: + type: object + properties: + week: + type: integer + statuses: + type: integer + logins: + type: integer + registrations: + type: integer + + DomainBlock: + type: object + properties: + domain: + type: string + digest: + type: string + severity: + type: string + enum: + - silence + - suspend + comment: + type: string + + ExtendedDescription: + type: object + properties: + updated_at: + type: string + content: + type: string