-
Notifications
You must be signed in to change notification settings - Fork 195
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
ENH: OpenAPIのドキュメントを改良 #1438
Merged
Hiroshiba
merged 2 commits into
VOICEVOX:master
from
sabonerune:enh/title-to-description
Jun 27, 2024
Merged
ENH: OpenAPIのドキュメントを改良 #1438
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
440 changes: 284 additions & 156 deletions
440
test/e2e/__snapshots__/test_openapi/test_OpenAPIの形が変わっていないことを確認.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,11 @@ class SpeakerStyle(BaseModel): | |
話者のスタイル情報 | ||
""" | ||
|
||
name: str = Field(title="スタイル名") | ||
id: StyleId = Field(title="スタイルID") | ||
name: str = Field(description="スタイル名") | ||
id: StyleId = Field(description="スタイルID") | ||
type: StyleType = Field( | ||
default="talk", | ||
title=( | ||
description=( | ||
"スタイルの種類。" | ||
"talk:音声合成クエリの作成と音声合成が可能。" | ||
"singing_teacher:歌唱音声合成用のクエリの作成が可能。" | ||
Comment on lines
+23
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 直接関係はないのだが改行されないので見にくい気がする。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. そもそもスキーマは別リンクになっていて欲しい気もしますね。。 |
||
|
@@ -36,8 +36,10 @@ class SpeakerSupportedFeatures(BaseModel): | |
""" | ||
|
||
permitted_synthesis_morphing: Literal["ALL", "SELF_ONLY", "NOTHING"] = Field( | ||
title="モーフィング機能への対応", | ||
description="'ALL' は「全て許可」、'SELF_ONLY' は「同じ話者内でのみ許可」、'NOTHING' は「全て禁止」", | ||
description=( | ||
"モーフィング機能への対応。" | ||
"'ALL' は「全て許可」、'SELF_ONLY' は「同じ話者内でのみ許可」、'NOTHING' は「全て禁止」" | ||
), | ||
default="ALL", | ||
) | ||
|
||
|
@@ -47,12 +49,12 @@ class Speaker(BaseModel): | |
話者情報 | ||
""" | ||
|
||
name: str = Field(title="名前") | ||
speaker_uuid: str = Field(title="話者のUUID") | ||
styles: list[SpeakerStyle] = Field(title="スタイルの一覧") | ||
version: str = Field(title="話者のバージョン") | ||
name: str = Field(description="名前") | ||
speaker_uuid: str = Field(description="話者のUUID") | ||
styles: list[SpeakerStyle] = Field(description="スタイルの一覧") | ||
version: str = Field(description="話者のバージョン") | ||
supported_features: SpeakerSupportedFeatures = Field( | ||
title="話者の対応機能", default_factory=SpeakerSupportedFeatures | ||
description="話者の対応機能", default_factory=SpeakerSupportedFeatures | ||
) | ||
|
||
|
||
|
@@ -61,16 +63,16 @@ class StyleInfo(BaseModel): | |
スタイルの追加情報 | ||
""" | ||
|
||
id: StyleId = Field(title="スタイルID") | ||
id: StyleId = Field(description="スタイルID") | ||
icon: str = Field( | ||
title="このスタイルのアイコンをbase64エンコードしたもの、あるいはURL" | ||
description="このスタイルのアイコンをbase64エンコードしたもの、あるいはURL" | ||
) | ||
portrait: str | SkipJsonSchema[None] = Field( | ||
default=None, | ||
title="このスタイルの立ち絵画像をbase64エンコードしたもの、あるいはURL", | ||
description="このスタイルの立ち絵画像をbase64エンコードしたもの、あるいはURL", | ||
) | ||
voice_samples: list[str] = Field( | ||
title="サンプル音声をbase64エンコードしたもの、あるいはURL" | ||
description="サンプル音声をbase64エンコードしたもの、あるいはURL" | ||
) | ||
|
||
|
||
|
@@ -79,6 +81,8 @@ class SpeakerInfo(BaseModel): | |
話者の追加情報 | ||
""" | ||
|
||
policy: str = Field(title="policy.md") | ||
portrait: str = Field(title="立ち絵画像をbase64エンコードしたもの、あるいはURL") | ||
style_infos: list[StyleInfo] = Field(title="スタイルの追加情報") | ||
policy: str = Field(description="policy.md") | ||
portrait: str = Field( | ||
description="立ち絵画像をbase64エンコードしたもの、あるいはURL" | ||
) | ||
style_infos: list[StyleInfo] = Field(description="スタイルの追加情報") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
既に
description
が使用されていたので改行で対応した。