Generates a JSON schema that matches a function-wrap schema. Args: schema: The core schema. Returns: The generated JSON schema.
(self, schema: core_schema.WrapValidatorFunctionSchema)
| 1157 | ) |
| 1158 | |
| 1159 | def function_wrap_schema(self, schema: core_schema.WrapValidatorFunctionSchema) -> JsonSchemaValue: |
| 1160 | """Generates a JSON schema that matches a function-wrap schema. |
| 1161 | |
| 1162 | Args: |
| 1163 | schema: The core schema. |
| 1164 | |
| 1165 | Returns: |
| 1166 | The generated JSON schema. |
| 1167 | """ |
| 1168 | if self.mode == 'validation' and (input_schema := schema.get('json_schema_input_schema')): |
| 1169 | return self.generate_inner(input_schema) |
| 1170 | |
| 1171 | return self.generate_inner(schema['schema']) |
| 1172 | |
| 1173 | def default_schema(self, schema: core_schema.WithDefaultSchema) -> JsonSchemaValue: |
| 1174 | """Generates a JSON schema that matches a schema with a default value. |
nothing calls this directly
no test coverage detected