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

enhance(backend): enhance SchemaType handling of anyOf #9762

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

tamaina
Copy link
Contributor

@tamaina tamaina commented Feb 1, 2023

Fix #8514

What

  • type: 'object'の中のanyOfの中身たちはtype: 'object'として扱うように
  • propertiesとanyOfを同時指定できるように
  • anyOfの中にrequiredだけ指定するのは流石にやめてほしいので直した

Additional info (optional)

APIの検査が弾かれないか未テスト 大丈夫っぽい

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Feb 1, 2023
@tamaina tamaina requested a review from syuilo February 1, 2023 09:57
@syuilo syuilo merged commit 7c3143b into misskey-dev:develop Feb 1, 2023
@syuilo
Copy link
Member

syuilo commented Feb 1, 2023

🙏🏻🙏🏻🙏🏻

AyumuNekozuki pushed a commit to AyumuNekozuki/misskey that referenced this pull request Feb 13, 2023
)

* enhance(backend): enhance anyOf handling

* clean up
Comment on lines +162 to +164
properties: {
renoteId: { type: 'string', format: 'misskey:id', nullable: true },
},
Copy link
Contributor

Choose a reason for hiding this comment

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

{ renoteId: null } だけで虚無投稿ができてしまう。
また、これだけでanyOfの条件を満たしてしまうと思われるため、renoteId: nullさえあれば他のanyOfの制約が効かなくなってしまう。
と思うのだわ。

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SchemaTypeDef の anyOf が機能していない
3 participants