Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): use prefixItems in admin/queue/*-delayed endpoint schema #14468

Conversation

zyoshoka
Copy link
Contributor

What

admin/queue/*-delayed エンドポイントのレスポンススキーマにおいて、タプルの表現に items, anyOf が使われていたのを prefixItems を使うように修正し、関連するフロントエンドでの型エラーを解消します。

Why

  • API スキーマの正確化
  • フロントエンドにおける型エラーの解消

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Aug 26, 2024
Copy link
Contributor

github-actions bot commented Aug 26, 2024

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -9912,16 +9912,15 @@
                   "type": "array",
                   "items": {
                     "type": "array",
-                    "items": {
-                      "anyOf": [
-                        {
-                          "type": "string"
-                        },
-                        {
-                          "type": "number"
-                        }
-                      ]
-                    }
+                    "prefixItems": [
+                      {
+                        "type": "string"
+                      },
+                      {
+                        "type": "number"
+                      }
+                    ],
+                    "unevaluatedItems": false
                   },
                   "example": [
                     [
@@ -10067,16 +10066,15 @@
                   "type": "array",
                   "items": {
                     "type": "array",
-                    "items": {
-                      "anyOf": [
-                        {
-                          "type": "string"
-                        },
-                        {
-                          "type": "number"
-                        }
-                      ]
-                    }
+                    "prefixItems": [
+                      {
+                        "type": "string"
+                      },
+                      {
+                        "type": "number"
+                      }
+                    ],
+                    "unevaluatedItems": false
                   },
                   "example": [
                     [

Get diff files from Workflow Page

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 47.36842% with 30 lines in your changes missing coverage. Please review.

Project coverage is 41.69%. Comparing base (255c8bd) to head (517fa40).
Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/pages/admin/queue.chart.vue 0.00% 15 Missing ⚠️
...ckages/frontend/src/pages/admin/overview.queue.vue 0.00% 11 Missing ⚠️
packages/frontend/src/pages/admin/queue.vue 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #14468       +/-   ##
============================================
+ Coverage    20.21%   41.69%   +21.47%     
============================================
  Files          725     1551      +826     
  Lines       100550   197057    +96507     
  Branches      1050     3568     +2518     
============================================
+ Hits         20327    82159    +61832     
- Misses       79681   114306    +34625     
- Partials       542      592       +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@KisaragiEffective KisaragiEffective left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM. ありがとうございます 🙏🏻

@syuilo syuilo merged commit 7fe3035 into misskey-dev:develop Aug 30, 2024
28 checks passed
@syuilo
Copy link
Member

syuilo commented Aug 30, 2024

🙏🏿

@zyoshoka zyoshoka deleted the improve-schema-of-admin-queue-delayed-endpoints branch August 30, 2024 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants