Repository navigation
WebAPI 0.214.0に対応する - #801
Merged
Merged
Conversation
- Modified `AnnotationTypeFieldValueVertexCountMinMax` to enforce minimum vertex counts for `Polyline2d` and `Polygon2d`. - Enhanced descriptions in `BatchAnnotationV1`, `SingleAnnotationDetailV1`, and other models for clarity on attribute properties. - Updated `DefaultAnnotationType` documentation to use consistent terminology for annotation types. - Improved descriptions in Swagger API components for user-defined annotation types and field definitions. - Changed version number in Swagger files to 0.214.0.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The generated from_dict() methods convert omitted optional fields into explicit nulls in both models, altering round-trip output and losing the distinction between omitted fields and explicit null values.
1 open issue
What changed in this PR
Annofab API のアノテーション仕様に関するスキーマを更新し、Python クライアントの生成モデルと説明に反映する PR です。
変更内容:
- 頂点数の上下限を省略・null 許容に変更し、最小サイズ・誤差許容値・挿入位置の制約を更新。
- 最小サイズの判定条件を文字列列挙型からオブジェクト形式に変更。
- 属性とフィールド設定の説明を整理し、API の権限・タスク更新制限の記載と Swagger バージョンを更新。
| File | Description |
|---|---|
| generate/swagger/swagger.yaml | バージョン、型の表示、権限・更新制限の記載を更新。 |
| generate/swagger/swagger.v2.yaml | API バージョンを 0.214.0 に更新。 |
| generate/swagger/swagger-api-components.yaml | フィールド制約、判定条件の構造、属性の説明を更新。 |
| annofabapi/pydantic_models/user_defined_annotation_type_field_definition.py | フィールド定義と設定値の対応説明を追加。 |
| annofabapi/pydantic_models/user_defined_annotation_data_type.py | データ型ごとの利用可能フィールドの説明を修正。 |
| annofabapi/pydantic_models/single_annotation_detail_v1.py | 属性種別と格納先の対応説明を修正。 |
| annofabapi/pydantic_models/plugin_detail_extended_annotation_specs.py | アノテーション種別の用語を統一。 |
| annofabapi/pydantic_models/label_v3.py | ラベルのフィールド設定例と対応表を追加。 |
| annofabapi/pydantic_models/default_annotation_type.py | 標準種別の説明用語を統一。 |
| annofabapi/pydantic_models/batch_annotation_v1.py | 属性種別と格納先の対応説明を修正。 |
| annofabapi/pydantic_models/annotation_type.py | ユーザー定義種別の説明用語を統一。 |
| annofabapi/pydantic_models/annotation_type_field_value.py | 標準・ユーザー定義種別の設定値を説明。 |
| annofabapi/pydantic_models/annotation_type_field_value_vertex_count_min_max.py | 頂点数の制約と省略・null の扱いを更新。 |
| annofabapi/pydantic_models/annotation_type_field_value_minimum_size2d_with_default_insert_position.py | サイズ制約、挿入位置の要素数、変換処理を更新。 |
| annofabapi/pydantic_models/annotation_type_field_value_minimum_size.py | サイズの下限を 0 に変更し、判定条件の変換を更新。 |
| annofabapi/pydantic_models/annotation_type_field_value_margin_of_error_tolerance.py | 誤差許容値の下限を 0 に変更。 |
| annofabapi/pydantic_models/annotation_type_field_min_warn_rule.py | 判定条件をオブジェクト形式のモデルに変更。 |
| annofabapi/pydantic_models/annotation_query.py | 検索属性の対応説明を修正。 |
| annofabapi/pydantic_models/annotation_detail_v1.py | 属性種別と格納先の対応説明を修正。 |
| annofabapi/pydantic_models/additional_data_v1.py | 属性値の説明内の列挙順を整理。 |
| annofabapi/pydantic_models/additional_data_restriction_condition.py | 制約対象の説明内の列挙順を整理。 |
| annofabapi/pydantic_models/additional_data_definition_type.py | 自由記述属性の説明と列挙順を修正。 |
| annofabapi/pydantic_models/additional_data_default_type.py | 初期値の説明表の行順を整理。 |
| annofabapi/models.py | 判定条件の型変更と各種説明を反映。 |
| annofabapi/generated_api.py | 権限とタスク入力データの更新制限を説明に反映。 |
| annofabapi/dataclass/annotation.py | 属性値に関する説明を同期。 |
| annofabapi/dataclass/annotation_specs.py | 頂点数の nullable 型と設定説明を反映。 |
Review effort: Balanced
Comment on lines
+85
to
+86
| if self.min is None and "min" in self.model_fields_set: | ||
| _dict["min"] = None |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

AnnotationTypeFieldValueVertexCountMinMaxto enforce minimum vertex counts forPolyline2dandPolygon2d.BatchAnnotationV1,SingleAnnotationDetailV1, and other models for clarity on attribute properties.DefaultAnnotationTypedocumentation to use consistent terminology for annotation types.