mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(mm): make key
required in openapi schema for model config
This commit is contained in:
parent
6829610a71
commit
a8b6635050
@ -162,7 +162,11 @@ class ModelConfigBase(BaseModel):
|
||||
description="Default settings for this model", default=None
|
||||
)
|
||||
|
||||
model_config = ConfigDict(validate_assignment=True)
|
||||
@staticmethod
|
||||
def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseModel]) -> None:
|
||||
schema["required"].extend(["key"])
|
||||
|
||||
model_config = ConfigDict(validate_assignment=True, json_schema_extra=json_schema_extra)
|
||||
|
||||
|
||||
class CheckpointConfigBase(ModelConfigBase):
|
||||
|
Loading…
Reference in New Issue
Block a user