alitheg commented on code in PR #442: URL: https://github.com/apache/tooling-trusted-releases/pull/442#discussion_r2645408621
########## atr/sbom/models/base.py: ########## @@ -21,7 +21,7 @@ class Lax(pydantic.BaseModel): - model_config = pydantic.ConfigDict(extra="allow", strict=False) + model_config = pydantic.ConfigDict(extra="allow", strict=False, validate_assignment=True, validate_by_name=True) Review Comment: I've synced them up and will test. FYI - adding `validate_by_name` allows us to deal with re-validating json dumped schemas where the name is aliased. So for example - SBOMs have a `bom-ref` property which we alias to `bom_ref`, but without `validate_by_name` if you load one you previous dumped, it has dumped with the underscore and therefore doesn't re-load that property, treating it as extra instead. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
