Skip to content

[Bug]: unstable error message for additional properties #1152

@number492

Description

@number492

Actual Behavior

When using the additional_properties_default_policy config option with the 'forbid' value, and multiple additional values are present, the error message lists the relevant properties in potentially different order every time.
Sorting errors at

extras = set(find_additional_properties(instance, schema))
might solve this issue.

Expected Behavior

Error messages are deterministic.

Steps to Reproduce

See Actual Behavior.

OpenAPI Core Version

0.23.0

OpenAPI Core Integration

None

Affected Area(s)

Validation

References

No response

Anything else we need to know?

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugIndicates an issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions