Skip to content

Remove deprecated keywords search parameter guard from ExperimentsSearch #720

@bencap

Description

@bencap

Summary

When the keywords search parameter was replaced by controlled_keywords in #702, a model_validator was added to ExperimentsSearch (in src/mavedb/view_models/search.py) to surface a clear error message to consumers still sending the old field.

Proposed Behavior

Remove the reject_deprecated_keywords model_validator from both ExperimentsSearch and ScoreSetsSearch. Requests that include a keywords field in the search body should result in a standard Pydantic validation error (extra field rejected) rather than the custom deprecation message.

Acceptance Criteria

  • The reject_deprecated_keywords validator is removed from ExperimentsSearch in src/mavedb/view_models/search.py.
  • If model_validator is no longer used anywhere in search.py after the removal, its import is also cleaned up.
  • Any tests that assert the specific deprecation error message for the keywords field are removed or updated to reflect standard Pydantic extra-field rejection behavior.
  • Existing tests for valid controlled_keywords payloads continue to pass.

Implementation Notes

  • The validator to remove is reject_deprecated_keywords decorated with @model_validator(mode="before") on both ExperimentsSearch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    app: backendTask implementation touches the backendtype: maintenanceMaintaining this project

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions