File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ replace_from_dict_method() {
105
105
local filename=$2
106
106
sed " s/return cls\.from_dict(json\.loads(json_str))/result = cls.from_dict(json.loads(json_str))\\ n if result.type != \" $type_value \" : raise ValueError(\" Invalid type\" )\\ n return result/" out/openapi_client/models/${filename} --in-place
107
107
}
108
-
108
+ # `from_dict`メソッドで`oneOf`に該当するスキーマが複数見つかる場合はErrorが発生する
109
+ # その場合は、`type`の値を判定するようにした
109
110
replace_from_dict_method Movie system_metadata_movie.py
110
111
replace_from_dict_method Image system_metadata_image.py
111
112
replace_from_dict_method Custom system_metadata_custom.py
@@ -117,6 +118,7 @@ replace_from_dict_method SegmentationV2 full_annotation_data_segmentation_v2.py
117
118
cp out/openapi_client/models/* .py ../annofabapi/pydantic_models
118
119
rm -Rf out/openapi_client
119
120
121
+
120
122
DOCKER_IMAGE=openapitools/openapi-generator-cli:v4.3.1
121
123
docker run --rm -u ` id -u` :` id -g` -v ${PWD} :/local -w /local -e JAVA_OPTS=${JAVA_OPTS} ${DOCKER_IMAGE} generate \
122
124
--input-spec swagger/swagger-models.yaml \
You can’t perform that action at this time.
0 commit comments