mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(mm): make type
and format
required in openapi schema for model config
This commit is contained in:
parent
58fa9c2fac
commit
3030a34b88
@ -164,7 +164,7 @@ class ModelConfigBase(BaseModel):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseModel]) -> None:
|
def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseModel]) -> None:
|
||||||
schema["required"].extend(["key"])
|
schema["required"].extend(["key", "type", "format"])
|
||||||
|
|
||||||
model_config = ConfigDict(validate_assignment=True, json_schema_extra=json_schema_extra)
|
model_config = ConfigDict(validate_assignment=True, json_schema_extra=json_schema_extra)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user