Skip to content

Commit c64f20a

Browse files
Mary Hippmaryhipp
authored andcommitted
remove output_metdata from schema
1 parent 0c9c10a commit c64f20a

File tree

2 files changed

+4
-1255
lines changed

2 files changed

+4
-1255
lines changed

invokeai/app/util/custom_openapi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def openapi() -> dict[str, Any]:
7070
json_schema = invocation.model_json_schema(
7171
mode="serialization", ref_template="#/components/schemas/{model}"
7272
)
73+
# Remove output_metadata that is only used on back-end from the schema
74+
if "output_metadata" in json_schema["properties"]:
75+
json_schema["properties"].pop("output_metadata")
7376
move_defs_to_top_level(openapi_schema, json_schema)
7477
output_title = invocation.get_output_annotation().__name__
7578
outputs_ref = {"$ref": f"#/components/schemas/{output_title}"}

0 commit comments

Comments
 (0)