diff --git a/annofabapi/__version__.py b/annofabapi/__version__.py index 092052c1..a842d05a 100644 --- a/annofabapi/__version__.py +++ b/annofabapi/__version__.py @@ -1 +1 @@ -__version__ = '0.14.1' +__version__ = '0.15.0' diff --git a/annofabapi/dataclass/annotation.py b/annofabapi/dataclass/annotation.py index 54c95329..231d819b 100644 --- a/annofabapi/dataclass/annotation.py +++ b/annofabapi/dataclass/annotation.py @@ -88,7 +88,7 @@ class FullAnnotationDetail: """ annotation_id: Optional[str] - """annotation_type が classification の場合は label_id と同じ値が格納されます。 """ + """アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 """ user_id: Optional[str] """""" @@ -117,10 +117,10 @@ class FullAnnotation: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_id: Optional[str] - """""" + """タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_phase: Optional[TaskPhase] """""" @@ -132,7 +132,7 @@ class FullAnnotation: """""" input_data_id: Optional[str] - """""" + """入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ input_data_name: Optional[str] """""" @@ -169,10 +169,10 @@ class SimpleAnnotation: """アノテーションフォーマットのバージョンです。 アノテーションフォーマットとは、プロジェクト個別のアノテーション仕様ではなく、AnnoFabのアノテーション構造のことです。 したがって、アノテーション仕様を更新しても、このバージョンは変化しません。 バージョンの読み方と更新ルールは、業界慣習の[Semantic Versioning](https://semver.org/)にもとづきます。 JSONに出力されるアノテーションフォーマットのバージョンは、アノテーションZIPが作成される時点のものが使われます。 すなわち、`1.0.0`の時点のタスクで作成したアノテーションであっても、フォーマットが `1.0.1` に上がった次のZIP作成時では `1.0.1` となります。 バージョンを固定してZIPを残しておきたい場合は、プロジェクトが完了した時点でZIPをダウンロードして保管しておくか、またはプロジェクトを「停止中」にします。 """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_id: Optional[str] - """""" + """タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_phase: Optional[TaskPhase] """""" @@ -184,7 +184,7 @@ class SimpleAnnotation: """""" input_data_id: Optional[str] - """""" + """入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ input_data_name: Optional[str] """""" @@ -198,7 +198,7 @@ class SingleAnnotationDetail: """ annotation_id: Optional[str] - """annotation_type が classification の場合は label_id と同じ値が格納されます。 """ + """アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 """ account_id: Optional[str] """""" @@ -233,13 +233,13 @@ class SingleAnnotation: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_id: Optional[str] - """""" + """タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ input_data_id: Optional[str] - """""" + """入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ detail: Optional[SingleAnnotationDetail] """""" diff --git a/annofabapi/dataclass/annotation_specs.py b/annofabapi/dataclass/annotation_specs.py index 6873acad..df1792ad 100644 --- a/annofabapi/dataclass/annotation_specs.py +++ b/annofabapi/dataclass/annotation_specs.py @@ -117,7 +117,7 @@ class AnnotationSpecsHistory: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ updated_datetime: Optional[str] """""" @@ -255,7 +255,7 @@ class AnnotationSpecs: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ labels: Optional[List[Label]] """""" diff --git a/annofabapi/dataclass/input.py b/annofabapi/dataclass/input.py index bfb864a9..a5531ac1 100644 --- a/annofabapi/dataclass/input.py +++ b/annofabapi/dataclass/input.py @@ -33,10 +33,10 @@ class InputData: """ input_data_id: str - """""" + """入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ input_data_name: str """表示用の名前です。""" diff --git a/annofabapi/dataclass/inspection.py b/annofabapi/dataclass/inspection.py index 75ede85f..48167b29 100644 --- a/annofabapi/dataclass/inspection.py +++ b/annofabapi/dataclass/inspection.py @@ -26,16 +26,16 @@ class Inspection: 検査コメント """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_id: str - """""" + """タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ input_data_id: str - """""" + """入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ inspection_id: str - """""" + """検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ phase: TaskPhase """""" @@ -53,7 +53,7 @@ class Inspection: """""" parent_inspection_id: Optional[str] - """""" + """検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ phrases: Optional[List[str]] """選択された定型指摘ID. 未選択時は空""" diff --git a/annofabapi/dataclass/job.py b/annofabapi/dataclass/job.py index c2e70286..26cb4004 100644 --- a/annofabapi/dataclass/job.py +++ b/annofabapi/dataclass/job.py @@ -22,7 +22,7 @@ class JobInfo: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ job_type: Optional[str] """""" diff --git a/annofabapi/dataclass/project.py b/annofabapi/dataclass/project.py index a938d2c5..b96fd06d 100644 --- a/annofabapi/dataclass/project.py +++ b/annofabapi/dataclass/project.py @@ -64,7 +64,7 @@ class Project: """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ organization_id: str """""" diff --git a/annofabapi/dataclass/project_member.py b/annofabapi/dataclass/project_member.py index bd5928aa..f1ab2729 100644 --- a/annofabapi/dataclass/project_member.py +++ b/annofabapi/dataclass/project_member.py @@ -24,7 +24,7 @@ class ProjectMember: """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ account_id: str """""" diff --git a/annofabapi/dataclass/statistics.py b/annofabapi/dataclass/statistics.py index 4c6e324d..90017f1e 100644 --- a/annofabapi/dataclass/statistics.py +++ b/annofabapi/dataclass/statistics.py @@ -102,7 +102,7 @@ class InspectionStatistics: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ date: Optional[str] """集計日""" @@ -127,7 +127,7 @@ class TaskPhaseStatistics: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ date: Optional[str] """""" @@ -200,7 +200,7 @@ class WorktimeStatistics: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ date: Optional[str] """""" diff --git a/annofabapi/dataclass/supplementary.py b/annofabapi/dataclass/supplementary.py index 8172e2c3..a170a39c 100644 --- a/annofabapi/dataclass/supplementary.py +++ b/annofabapi/dataclass/supplementary.py @@ -22,10 +22,10 @@ class SupplementaryData: """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ input_data_id: str - """""" + """入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ supplementary_data_id: str """""" diff --git a/annofabapi/dataclass/task.py b/annofabapi/dataclass/task.py index c70acb66..1feaf0f7 100644 --- a/annofabapi/dataclass/task.py +++ b/annofabapi/dataclass/task.py @@ -24,10 +24,10 @@ class TaskHistory: タスクのあるフェーズで、誰がいつどれくらいの作業時間を費やしたかを表すタスク履歴です。 """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_id: str - """""" + """タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_history_id: str """""" @@ -70,10 +70,10 @@ class Task: """ project_id: str - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ task_id: str - """""" + """タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ phase: TaskPhase """""" diff --git a/annofabapi/dataclass/webhook.py b/annofabapi/dataclass/webhook.py index 7ae69118..057ee2bf 100644 --- a/annofabapi/dataclass/webhook.py +++ b/annofabapi/dataclass/webhook.py @@ -33,13 +33,13 @@ class Webhook: """ project_id: Optional[str] - """""" + """プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ event_type: Optional[str] """""" webhook_id: Optional[str] - """""" + """WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) """ webhook_status: Optional[str] """""" diff --git a/annofabapi/generated_api.py b/annofabapi/generated_api.py index 3dfe2dff..34e5e156 100644 --- a/annofabapi/generated_api.py +++ b/annofabapi/generated_api.py @@ -779,7 +779,7 @@ def put_input_data(self, project_id: str, input_data_id: str, Args: project_id (str): プロジェクトID (required) - input_data_id (str): 入力データID (required) + input_data_id (str): 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) (required) request_body (Any): Request Body input_data_request (InputDataRequest): (required) @@ -1815,7 +1815,7 @@ def put_project(self, project_id: str, request_body: Optional[Any] = None) -> Tu プロジェクトを新規作成または更新します。 ### 新規作成する場合 ユーザーは、作成するプロジェクトをひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 ### 更新する場合 ユーザーは、更新するプロジェクトの [ProjectOwner](#section/Authentication/ProjectOwner) である必要があります。 また所属組織を変更する場合は、新しくひもづける組織の [OrganizationAdministrator](#section/Authentication/OrganizationAdministrator) である必要があります。 なお、プロジェクト状態を「停止中」にした場合、アノテーションZIPやタスク進捗状況などの集計情報は自動更新されなくなります。 Args: - project_id (str): プロジェクトID (required) + project_id (str): プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) (required) request_body (Any): Request Body put_project_request (PutProjectRequest): (required) @@ -2490,7 +2490,7 @@ def put_task(self, project_id: str, task_id: str, Args: project_id (str): プロジェクトID (required) - task_id (str): タスクID (required) + task_id (str): タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) (required) request_body (Any): Request Body task_request (TaskRequest): (required) @@ -2599,7 +2599,7 @@ def put_webhook(self, project_id: str, webhook_id: str, Args: project_id (str): プロジェクトID (required) - webhook_id (str): WebhookID (required) + webhook_id (str): WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) (required) request_body (Any): Request Body webhook (Webhook): (required) diff --git a/annofabapi/models.py b/annofabapi/models.py index 7d00d2e0..b41ec471 100644 --- a/annofabapi/models.py +++ b/annofabapi/models.py @@ -281,10 +281,10 @@ class AdditionalDataDefinitionType(Enum): FLAG = "flag" INTEGER = "integer" - TEXT = "text" COMMENT = "comment" CHOICE = "choice" SELECT = "select" + TEXT = "text" TRACKING = "tracking" LINK = "link" @@ -313,11 +313,11 @@ class AdditionalDataDefinitionType(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * details: List[AnnotationDetail] * comment: str @@ -344,7 +344,7 @@ class AnnotationDataHoldingType(Enum): Kyes of Dict * annotation_id: str - annotation_type が classification の場合は label_id と同じ値が格納されます。 + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 * account_id: str * label_id: str @@ -396,11 +396,11 @@ class AnnotationDataHoldingType(Enum): Kyes of Dict * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * exact_match_task_id: bool タスクIDの検索方法を指定します。 trueの場合は完全一致検索、falseの場合は中間一致検索です。 * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * exact_match_input_data_id: bool 入力データIDの検索方法を指定します。 trueの場合は完全一致検索、falseの場合は中間一致検索です。 * label_id: str @@ -417,7 +417,7 @@ class AnnotationDataHoldingType(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * labels: List[Label] * inspection_phrases: List[InspectionPhrase] @@ -432,7 +432,7 @@ class AnnotationDataHoldingType(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * updated_datetime: str * url: str @@ -491,13 +491,13 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * annotation_id: str - annotation_type が classification の場合は label_id と同じ値が格納されます。 + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 * label_id: str * additional_data_list: List[FullAnnotationAdditionalData] @@ -514,13 +514,13 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * annotation_id: str - annotation_type が classification の場合は label_id と同じ値が格納されます。 + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 * updated_datetime: str * type: str @@ -548,9 +548,9 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * type: str [詳しくはこちら](#section/API-Convention/API-_type) @@ -563,13 +563,13 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * inspection_id: str - + 検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) * type: str [詳しくはこちら](#section/API-Convention/API-_type) @@ -595,9 +595,9 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * type: str [詳しくはこちら](#section/API-Convention/API-_type) @@ -835,7 +835,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * message: str エラーの概要 -* ext: Dict +* ext: __DictStrKeyAnyValue__ 補足情報 """ @@ -848,7 +848,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -861,7 +861,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -874,7 +874,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -887,7 +887,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -900,7 +900,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -913,7 +913,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -926,7 +926,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -939,7 +939,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -952,7 +952,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -965,7 +965,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -978,7 +978,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -991,7 +991,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -1004,7 +1004,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -1017,7 +1017,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -1030,7 +1030,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -1043,7 +1043,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -1056,7 +1056,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * errors: List[Error] -* context: Dict +* context: __DictStrKeyAnyValue__ 内部補足情報 """ @@ -1068,9 +1068,9 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_phase: TaskPhase * task_phase_stage: int @@ -1078,7 +1078,7 @@ class AssigneeRuleOfResubmittedTask(Enum): * task_status: TaskStatus * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_name: str * detail: List[FullAnnotationDetail] @@ -1253,7 +1253,7 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * annotation_id: str - annotation_type が classification の場合は label_id と同じ値が格納されます。 + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 * user_id: str * label_id: str @@ -1477,9 +1477,9 @@ class AssigneeRuleOfResubmittedTask(Enum): Kyes of Dict * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_name: str 表示用の名前です。 * input_data_path: str @@ -1536,7 +1536,7 @@ class InputDataOrder(Enum): Kyes of Dict * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * inspection_summary: str * annotation_summaries: List[ValidationError] @@ -1561,13 +1561,13 @@ class InputDataType(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * inspection_id: str - + 検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) * phase: TaskPhase * phase_stage: int @@ -1579,7 +1579,7 @@ class InputDataType(Enum): * data: OneOfInspectionDataPointInspectionDataPolylineInspectionDataTime * parent_inspection_id: str - + 検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) * phrases: List[str] 選択された定型指摘ID. 未選択時は空 * comment: str @@ -1669,7 +1669,7 @@ class InputDataType(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * date: str 集計日 * breakdown: InspectionStatisticsBreakdown @@ -1842,16 +1842,16 @@ class InspectionStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * job_type: str * job_id: str * job_status: str -* job_execution: Dict +* job_execution: __DictStrKeyAnyValue__ ジョブの内部情報 -* job_detail: Dict +* job_detail: __DictStrKeyAnyValue__ ジョブ結果の内部情報 * created_datetime: str @@ -2155,7 +2155,7 @@ class OrganizationMemberStatus(Enum): Kyes of Dict * organization_name: str - + 組織名。[値の制約についてはこちら。](#section/API-Convention/APIID) * organization_email: str * price_plan: PricePlan @@ -2242,7 +2242,7 @@ class PricePlan(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * organization_id: str * title: str @@ -2328,7 +2328,7 @@ class PricePlan(Enum): Kyes of Dict * dest_project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * dest_title: str * dest_overview: str @@ -2357,7 +2357,7 @@ class PricePlan(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * account_id: str * user_id: str @@ -2504,7 +2504,7 @@ class ProjectStatus(Enum): * organization_id: str * organization_name: str - + 組織名。[値の制約についてはこちら。](#section/API-Convention/APIID) * last_updated_datetime: str @@ -2601,9 +2601,9 @@ class ProjectStatus(Enum): * annotation_format_version: str アノテーションフォーマットのバージョンです。 アノテーションフォーマットとは、プロジェクト個別のアノテーション仕様ではなく、AnnoFabのアノテーション構造のことです。 したがって、アノテーション仕様を更新しても、このバージョンは変化しません。 バージョンの読み方と更新ルールは、業界慣習の[Semantic Versioning](https://semver.org/)にもとづきます。 JSONに出力されるアノテーションフォーマットのバージョンは、アノテーションZIPが作成される時点のものが使われます。 すなわち、`1.0.0`の時点のタスクで作成したアノテーションであっても、フォーマットが `1.0.1` に上がった次のZIP作成時では `1.0.1` となります。 バージョンを固定してZIPを残しておきたい場合は、プロジェクトが完了した時点でZIPをダウンロードして保管しておくか、またはプロジェクトを「停止中」にします。 * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_phase: TaskPhase * task_phase_stage: int @@ -2611,7 +2611,7 @@ class ProjectStatus(Enum): * task_status: TaskStatus * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_name: str * details: List[SimpleAnnotationDetail] @@ -2631,7 +2631,7 @@ class ProjectStatus(Enum): 個々のアノテーションにつけられたIDです。 * data: FullAnnotationData -* attributes: Dict +* attributes: __DictStrKeyAnyValue__ キーに属性の名前、値に各属性の値が入った辞書構造です。 """ @@ -2643,11 +2643,11 @@ class ProjectStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * detail: SingleAnnotationDetail * updated_datetime: str @@ -2662,7 +2662,7 @@ class ProjectStatus(Enum): Kyes of Dict * annotation_id: str - annotation_type が classification の場合は label_id と同じ値が格納されます。 + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 * account_id: str * label_id: str @@ -2691,9 +2691,9 @@ class ProjectStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_id: str - + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) * supplementary_data_id: str * supplementary_data_name: str @@ -2739,9 +2739,9 @@ class ProjectStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * phase: TaskPhase * phase_stage: int @@ -2787,7 +2787,7 @@ class ProjectStatus(Enum): Kyes of Dict * task_id_prefix: str - 生成するタスクIDのプレフィックス + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) * allow_duplicate_input_data: bool falseのときは、既にタスクに使われている入力データを除外し、まだタスクに使われていない入力データだけを新しいタスクに割り当てます。trueのときは、既にタスクに使われている入力データを除外しません。 * input_data_count: int @@ -2806,7 +2806,7 @@ class ProjectStatus(Enum): Kyes of Dict * task_id_prefix: str - 生成するタスクIDのプレフィックス + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) * input_data_name_prefix: str タスク生成対象の入力データ名プレフィックス * type: str @@ -2834,9 +2834,9 @@ class ProjectStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_history_id: str * started_datetime: str @@ -2861,9 +2861,9 @@ class ProjectStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_history_id: str * created_datetime: str @@ -2927,7 +2927,7 @@ class TaskPhase(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * date: str * phases: List[PhaseStatistics] @@ -2979,9 +2979,9 @@ class TaskStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * inputs: List[InputDataSummary] @@ -2994,7 +2994,7 @@ class TaskStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * tasks: List[TasksInputsTask] @@ -3007,7 +3007,7 @@ class TaskStatus(Enum): Kyes of Dict * task_id: str - + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) * phase: TaskPhase * status: TaskStatus @@ -3122,11 +3122,11 @@ class TaskStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * event_type: str * webhook_id: str - + WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) * webhook_status: str * method: str @@ -3163,7 +3163,7 @@ class TaskStatus(Enum): Kyes of Dict -* placeholders: Dict +* placeholders: __DictStrKeyAnyValue__ プレースホルダ名と置換する値 """ @@ -3194,7 +3194,7 @@ class TaskStatus(Enum): Kyes of Dict * project_id: str - + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) * date: str * by_tasks: List[WorktimeStatisticsItem] diff --git a/generate/generate.sh b/generate/generate.sh index be47648e..5e96126f 100755 --- a/generate/generate.sh +++ b/generate/generate.sh @@ -56,7 +56,7 @@ JAVA_OPTS="-Dlog.level=info" OPENAPI_GENERATOR_CLI_COMMON_OPTION="--generator-name python \ --output /local/out \ - --type-mappings array=List,DateTime=str,date=str,object=Dict" + --type-mappings array=List,DateTime=str,date=str,object=__DictStrKeyAnyValue__" # v1 apiを生成 docker run --rm -u `id -u`:`id -g` -v ${PWD}:/local -w /local -e JAVA_OPTS=${JAVA_OPTS} openapitools/openapi-generator-cli generate \ @@ -191,6 +191,11 @@ declare -a model_files=(${MODELS_DIR}/webhook_header.py ${MODELS_DIR}/webhook.py cat partial-header/dataclass/common.py partial-header/dataclass/webhook.py \ ${model_files[@]} > ../annofabapi/dataclass/webhook.py + +sed -e "s/__DictStrKeyAnyValue__/Dict[str,Any]/g" ../annofabapi/dataclass/*.py --in-place + + + rm -Rf out/openapi_client diff --git a/generate/swagger-api-components.yaml b/generate/swagger-api-components.yaml index 547bc58c..8f006d23 100644 --- a/generate/swagger-api-components.yaml +++ b/generate/swagger-api-components.yaml @@ -823,7 +823,7 @@ - price_plan properties: organization_name: - type: string + $ref: "#/components/schemas/OrganizationName" organization_email: type: string format: email @@ -839,7 +839,7 @@ organization_id: type: string organization_name: - type: string + $ref: "#/components/schemas/OrganizationName" last_updated_datetime: type: string format: date-time @@ -866,9 +866,16 @@ OrganizationId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + OrganizationName: + type: string + example: "sample-organization" + description: | + 組織名。[値の制約についてはこちら。](#section/API-Convention/APIID) ProjectId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) LabelId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" @@ -884,9 +891,13 @@ TaskId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) InputDataId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) SupplementaryDataId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" @@ -897,16 +908,21 @@ type: string example: "12345678-abcd-1234-abcd-1234abcd5678" description: | + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 InspectionId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + 検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) JobId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" WebhookId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) Duration: type: string example: "PT34H17M36.789S" @@ -1796,7 +1812,8 @@ properties: task_id_prefix: type: string - description: 生成するタスクIDのプレフィックス + description: | + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) allow_duplicate_input_data: type: boolean description: falseのときは、既にタスクに使われている入力データを除外し、まだタスクに使われていない入力データだけを新しいタスクに割り当てます。trueのときは、既にタスクに使われている入力データを除外しません。 @@ -1819,7 +1836,8 @@ properties: task_id_prefix: type: string - description: 生成するタスクIDのプレフィックス + description: | + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) input_data_name_prefix: type: string description: タスク生成対象の入力データ名プレフィックス diff --git a/generate/swagger.v2.yaml b/generate/swagger.v2.yaml index 056f7399..f687d2d4 100644 --- a/generate/swagger.v2.yaml +++ b/generate/swagger.v2.yaml @@ -54,7 +54,28 @@ info: * `_type` 属性を指定しない場合は、リクエストボディで指定された `_type` 以外の属性からデコードすべき型を推論します。適切な型が見つからない場合はエラーになります。 * `_type` 属性は「推論が失敗して別の型にデコードされる」ことを防ぐために指定することを推奨します。しかし利便性のため指定は必須ではありません。 - version: 0.60.0 + ## APIに指定するIDの制約 + + * APIで使用する各データのIDに使用できる文字種は次の通りです。 + * 半角英数字 + * `_` (アンダースコア) + * `-` (ハイフン) + * `.` (ドット) + * 特に制限がない限りUUID version4形式とすることを推奨します。 + * 例) `b048c6b3-b36f-4c8d-97ea-96828a50a44c` + * 各データのIDは、以下のように特定のデータに対して一意な値である必要があります。 + + ID | 一意制約 + ---|--- + 組織名 | AnnoFab内で一意 + プロジェクトID | AnnoFab内で一意 + タスクID(プレフィックス含む) | プロジェクト内で一意 + 入力データID | プロジェクト内で一意 + アノテーションID | プロジェクト内で一意 + 検査ID | プロジェクト内で一意 + WebhookID | プロジェクト内で一意 + + version: 0.61.0 title: AnnoFab Web API x-logo: url: "https://annofab.com/images/logo_landscape.png" @@ -1361,7 +1382,7 @@ components: - price_plan properties: organization_name: - type: string + $ref: "#/components/schemas/OrganizationName" organization_email: type: string format: email @@ -1377,7 +1398,7 @@ components: organization_id: type: string organization_name: - type: string + $ref: "#/components/schemas/OrganizationName" last_updated_datetime: type: string format: date-time @@ -1404,9 +1425,16 @@ components: OrganizationId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + OrganizationName: + type: string + example: "sample-organization" + description: | + 組織名。[値の制約についてはこちら。](#section/API-Convention/APIID) ProjectId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) LabelId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" @@ -1422,9 +1450,13 @@ components: TaskId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) InputDataId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) SupplementaryDataId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" @@ -1435,16 +1467,21 @@ components: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" description: | + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 InspectionId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + 検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) JobId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" WebhookId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) Duration: type: string example: "PT34H17M36.789S" @@ -2334,7 +2371,8 @@ components: properties: task_id_prefix: type: string - description: 生成するタスクIDのプレフィックス + description: | + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) allow_duplicate_input_data: type: boolean description: falseのときは、既にタスクに使われている入力データを除外し、まだタスクに使われていない入力データだけを新しいタスクに割り当てます。trueのときは、既にタスクに使われている入力データを除外しません。 @@ -2357,7 +2395,8 @@ components: properties: task_id_prefix: type: string - description: 生成するタスクIDのプレフィックス + description: | + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) input_data_name_prefix: type: string description: タスク生成対象の入力データ名プレフィックス diff --git a/generate/swagger.yaml b/generate/swagger.yaml index a695a536..b5716329 100644 --- a/generate/swagger.yaml +++ b/generate/swagger.yaml @@ -54,7 +54,28 @@ info: * `_type` 属性を指定しない場合は、リクエストボディで指定された `_type` 以外の属性からデコードすべき型を推論します。適切な型が見つからない場合はエラーになります。 * `_type` 属性は「推論が失敗して別の型にデコードされる」ことを防ぐために指定することを推奨します。しかし、利便性のために一部APIを除き指定は必須ではありません。 - version: 0.60.0 + ## APIに指定するIDの制約 + + * APIで使用する各データのIDに使用できる文字種は次の通りです。 + * 半角英数字 + * `_` (アンダースコア) + * `-` (ハイフン) + * `.` (ドット) + * 特に制限がない限りUUID version4形式とすることを推奨します。 + * 例) `b048c6b3-b36f-4c8d-97ea-96828a50a44c` + * 各データのIDは、以下のように特定のデータに対して一意な値である必要があります。 + + ID | 一意制約 + ---|--- + 組織名 | AnnoFab内で一意 + プロジェクトID | AnnoFab内で一意 + タスクID(プレフィックス含む) | プロジェクト内で一意 + 入力データID | プロジェクト内で一意 + アノテーションID | プロジェクト内で一意 + 検査ID | プロジェクト内で一意 + WebhookID | プロジェクト内で一意 + + version: 0.61.0 title: AnnoFab Web API x-logo: url: "https://annofab.com/images/logo_landscape.png" @@ -1270,7 +1291,8 @@ paths: parameters: - name: project_id in: path - description: プロジェクトID + description: | + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "#/components/schemas/ProjectId" @@ -2076,7 +2098,8 @@ paths: $ref: "#/components/schemas/ProjectId" - name: webhook_id in: path - description: WebhookID + description: | + WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "#/components/schemas/WebhookId" @@ -2753,7 +2776,8 @@ paths: $ref: "#/components/schemas/ProjectId" - name: task_id in: path - description: タスクID + description: | + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "#/components/schemas/TaskId" @@ -3895,7 +3919,8 @@ paths: $ref: "#/components/schemas/ProjectId" - name: input_data_id in: path - description: 入力データID + description: | + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) required: true schema: $ref: "#/components/schemas/InputDataId" @@ -5240,7 +5265,7 @@ components: - price_plan properties: organization_name: - type: string + $ref: "#/components/schemas/OrganizationName" organization_email: type: string format: email @@ -5256,7 +5281,7 @@ components: organization_id: type: string organization_name: - type: string + $ref: "#/components/schemas/OrganizationName" last_updated_datetime: type: string format: date-time @@ -5283,9 +5308,16 @@ components: OrganizationId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + OrganizationName: + type: string + example: "sample-organization" + description: | + 組織名。[値の制約についてはこちら。](#section/API-Convention/APIID) ProjectId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + プロジェクトID。[値の制約についてはこちら。](#section/API-Convention/APIID) LabelId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" @@ -5301,9 +5333,13 @@ components: TaskId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + タスクID。[値の制約についてはこちら。](#section/API-Convention/APIID) InputDataId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + 入力データID。[値の制約についてはこちら。](#section/API-Convention/APIID) SupplementaryDataId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" @@ -5314,16 +5350,21 @@ components: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" description: | + アノテーションID。[値の制約についてはこちら。](#section/API-Convention/APIID)
annotation_type が classification の場合は label_id と同じ値が格納されます。 InspectionId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + 検査ID。[値の制約についてはこちら。](#section/API-Convention/APIID) JobId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" WebhookId: type: string example: "12345678-abcd-1234-abcd-1234abcd5678" + description: | + WebhookID。[値の制約についてはこちら。](#section/API-Convention/APIID) Duration: type: string example: "PT34H17M36.789S" @@ -6213,7 +6254,8 @@ components: properties: task_id_prefix: type: string - description: 生成するタスクIDのプレフィックス + description: | + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) allow_duplicate_input_data: type: boolean description: falseのときは、既にタスクに使われている入力データを除外し、まだタスクに使われていない入力データだけを新しいタスクに割り当てます。trueのときは、既にタスクに使われている入力データを除外しません。 @@ -6236,7 +6278,8 @@ components: properties: task_id_prefix: type: string - description: 生成するタスクIDのプレフィックス + description: | + 生成するタスクIDのプレフィックス。[値の制約についてはこちら。](#section/API-Convention/APIID) input_data_name_prefix: type: string description: タスク生成対象の入力データ名プレフィックス