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

Add channel schema #309

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

funwarioisii
Copy link
Contributor

@funwarioisii funwarioisii commented Nov 14, 2023

やったこと

https://misskey-hub.net/docs/api/endpoints/channels/show.html を確認したときに、そこからの Channel 型へのリンク先が 404 だったので、 channel の型情報を追加しました。

調べたこと

過去に同様の追加のPR がなかったのですが、

for (const [k, v] of Object.entries(commonDef.refs)) {
const page = await createPage(app, {
path: locale + `docs/api/entity/${k}.html`,
content: `---
filePath: '${locale + `docs/api/common.json5`}'
description: '${v.description}'
を見て自動生成しているようだったので src/docs/api/common.json5 を編集しました。

型の情報は https://github.com/misskey-dev/misskey/blob/30bb24d18c7d3f214114207dfe493ca9a9fe1faf/packages/backend/src/models/json-schema/channel.ts を参考にしました。

既存の型情報を見るに、 nullable などの情報は書かれていなかったので、書いていません。

note: {
type: 'object',
properties: {
id: {
type: 'string',
},
createdAt: {
type: 'string',
},
text: {
type: 'string',
nullable: true,
},
cw: {
type: 'string',
nullable: true,
},
user: {
$ref: 'misskey://User',
},
userId: {
type: 'string',
},
visibility: {
type: 'string',
enum: ['public', 'home', 'followers', 'specified',],
},
},
},

確認したこと

  • 手元で起動し、 http://localhost:8080/docs/api/entity/channel.html で問題なく表示されていました。

レビューお願いします 🙏

misskey-dev/misskey-hub-next#6 も読んだのですが、全体の方針がわからなかったので一旦PRを出しましたが、別にプロジェクトが走ってたらクローズお願いします

@kakkokari-gtyih
Copy link
Contributor

#204 Planned (HQ)
#222 Planned (HQ)

なのでMisskey HQ(株)側でAPIドキュメントの整備を進めておりますが、ここにマージするかどうかは @syuilo さんに判断してもらったほうがいいかと🙏

@syuilo
Copy link
Member

syuilo commented Nov 15, 2023

HQの方はあんまり進んでないかも?

@syuilo syuilo merged commit 0d40bd7 into misskey-dev:main Nov 15, 2023
@syuilo
Copy link
Member

syuilo commented Nov 15, 2023

🙏🙏🙏

@kakkokari-gtyih
Copy link
Contributor

(hub-nextのAPIドキュメントはHQが整備したものを逐次反映させるつもりで開発すすめてないのでどうするか考えないと)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants