David Montague

Results 40 issues of David Montague

**Note to self:** Once PR #5125 is merged, I'll want to merge in the changes from the `v2-discriminated-union-generics` branch. There are still some remaining challenges, but I think this is...

> @samuelcolvin Would you be open to adding `jsonschema` as a testing dependency for the sake of validating generated schemas? I like the idea, if for no other reason than...

In cases where a field is comprised of a union of types that each have a literal field that is incompatible with the other types in the union, it may...

If a user attempts to import removed functions, from removed modules, or both, we should give a better error message than a plain ImportError. Ideally the error message will include...

(This was left over from https://github.com/pydantic/pydantic/pull/5029) In #5029, I changed the name `__modify_schema__` to `__pydantic_modify_json_schema__`, but otherwise kept the functionality the same. In [this comment](https://github.com/pydantic/pydantic/pull/5029#issuecomment-1438394676), Samuel suggested that we change...

In #5029, the issue came up of what to do about renamed/removed keyword arguments to the `Field` function. The decision there was to use `**kwargs` to provide as much backwards...

In #5029, I introduced a new model method I called `model_json_schema_metadata`. This method was introduced for a few reasons: * Ease of overriding, especially on a shared base class used...

(This was left over from #5029) We should resolve the xfailure of the following test: https://github.com/pydantic/pydantic/blob/73373c3e08fe5fe23e4b05f549ea34e0da6a16b7/tests/test_json_schema.py#L853-L874 In particular: * Should `minLength`/`maxLength` be set on the JSON schema for `AnyUrl`? *...

(This was left over from https://github.com/pydantic/pydantic/pull/5029) We should resolve the xfailure of the following test: https://github.com/pydantic/pydantic/blob/73373c3e08fe5fe23e4b05f549ea34e0da6a16b7/tests/test_json_schema.py#L1145-L1173 I don't have an opinion about what we _should_ do; I would be happy...