Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dicts to have both patternProperties and additionalProperties #4641

Merged
merged 1 commit into from Oct 27, 2022

Commits on Oct 22, 2022

  1. Allow dicts to have both patternProperties and additionalProperties

    Support for `patternProperties` was introduced in pydantic#332, but that logic
    unfortunately made `patternProperties` and `additionalProperties`
    mutually exclusive. JSON Schema supports their combination:
    
    https://json-schema.org/understanding-json-schema/reference/object.html#additional-properties
    
    This prevented well-typed code generation for dictionaries that use
    regex-constrained string keys.
    jparise committed Oct 22, 2022
    Copy the full SHA
    01a762f View commit details
    Browse the repository at this point in the history