Skip to content

Commit 198e873

Browse files
committed
fix default value for signature (typecheck)
1 parent 178da9c commit 198e873

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/models-library/src/models_library/utils/json_schema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ class GenerateResolvedJsonSchema(GenerateJsonSchema):
101101
Usage: pydantic_base_model.model_json_schema(schema_generator=GenerateResolvedJsonSchema) returns a json schema where it is guaranteed that all json references are resolved.
102102
"""
103103

104-
def generate(self, schema: CoreSchema, mode: JsonSchemaMode) -> JsonSchemaValue:
104+
def generate(
105+
self, schema: CoreSchema, mode: JsonSchemaMode = "validation"
106+
) -> JsonSchemaValue:
105107
schema_value = super().generate(schema=schema, mode=mode)
106108
schema_value = jsonref.replace_refs(schema_value, jsonschema=True)
107109
return JsonSchemaValue(schema_value)

0 commit comments

Comments
 (0)