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: fixed Note and User (#212) #214

Closed
wants to merge 2 commits into from
Closed

fix: fixed Note and User (#212) #214

wants to merge 2 commits into from

Conversation

myConsciousness
Copy link

こんにちは。

#212 で挙げた件について、
common.json5にあるNoteとUserの定義を実際のJSON構造に沿うように修正しました。

@syuilo
Copy link
Member

syuilo commented Mar 1, 2023

ありがとうございます!
クォーテーションの変更で差分が見にくくなってしまっているので、'で統一していただけますか? 👀

@myConsciousness
Copy link
Author

@syuilo

シングルクオートで修正しましたが、ほぼ新規扱いになりました 🤔

@yanorei32
Copy link

yanorei32 commented Mar 3, 2023

インデント幅がSpace: 4からSpace: 2に変更されている為ですね。これを直せば差分は減ると思います。

また、src/.vuepress/api.jsonによると、UserUserLiteUserDetailedとのUnionTypeであり、また、isBotはoptionalとなっているのですが、これは現在の実装に即しているのでしょうか。

追記:
https://github.com/misskey-dev/misskey/blob/7e8700514f18409874737cd5b439280bb03b829c/packages/backend/src/models/schema/user.ts

今軽く眺めたところ現在の実際のUser schemaは恐らくこれで、UserLiteとUserdetailedNotMeOnly、MeDetailedOnly、UserDetailedNotMe、MeDetailed並びにUserDetailedを新たに表現する必要がありそうです?

しかしこのスキーマも最終更新が16日前と活発に変更されており、これを手動にて更新し続けるのは困難を極める気がします。 #222 にIssueを建てましたが、根本的な改善が必要そうな気がします。

@myConsciousness
Copy link
Author

@yanorei32 @syuilo

なるほど、そうなるとまずドキュメントを作るための環境と標準が整備されていないのが問題でしょう。

私はVSCodeで編集していますが、このリポジトリのためだけに私のVSCodeの設定を自分で変更したくないです。また、ドキュメント中にUnionTypeやOptionalを埋め込む方式もどこにも明文化されていません。

そもそもなのですが、頻繁に変更されるAPIなのであれば、なおさら実ソースからjson5ファイルやMarkdownを生成するジェネレータを作るべきですね。簡単に作れると思うので、検討してみてください。

@myConsciousness
Copy link
Author

myConsciousness commented Mar 3, 2023

@syuilo

あと、この際なのでついでのリクエストですが、個人的にはMisskey APIのエンドポイントに関するドキュメントはちょっと使いにくいです。

というのも、例えばエンティティのフィールド情報などが最初に畳まれた状態なので、中身を見るのにいちいちクリックしないといけないです。もっとシンプルにできないものでしょうか?

まずは抜本的にドキュメントの構造をリファクタリングすることで、 @yanorei32 が示した改善もしやすくなると感じます。

@myConsciousness myConsciousness closed this by deleting the head repository Nov 20, 2024
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