Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use Pydantic to systematically validate a first batch of endpoints in synapse.rest.client.account. #13188

Merged
merged 32 commits into from
Aug 15, 2022

Commits on Jul 4, 2022

  1. Lock pydantic

    David Robertson committed Jul 4, 2022
    Configuration menu
    Copy the full SHA
    c932ed5 View commit details
    Browse the repository at this point in the history
  2. Use pydantic mypy plugin

    David Robertson committed Jul 4, 2022
    Configuration menu
    Copy the full SHA
    c40edbd View commit details
    Browse the repository at this point in the history
  3. Helper for validating a json body with pydantic

    David Robertson committed Jul 4, 2022
    Configuration menu
    Copy the full SHA
    52b0ef3 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2022

  1. Validate client/account/deactivate

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    87a6e79 View commit details
    Browse the repository at this point in the history
  2. Validate /client/account/password

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    c7caf5b View commit details
    Browse the repository at this point in the history
  3. Changelog

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    3319732 View commit details
    Browse the repository at this point in the history
  4. Better errcode when pw reset emails are disabled

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    9a47994 View commit details
    Browse the repository at this point in the history
  5. Validate /client/account/passsword/email/requestToken

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    0a87861 View commit details
    Browse the repository at this point in the history
  6. move out RequestToken body to models

    it's about to get reused
    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    3e2d003 View commit details
    Browse the repository at this point in the history
  7. Validate /client/account/3pid/email/requestToken

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    ba71e02 View commit details
    Browse the repository at this point in the history
  8. Ooops, use Strict* types for EmailRequestTokenBody

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    e4926c2 View commit details
    Browse the repository at this point in the history
  9. Fix linter whoops

    David Robertson committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    b81faf4 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Revert "Better errcode when pw reset emails are disabled"

    This reverts commit 9a47994.
    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    dc1f188 View commit details
    Browse the repository at this point in the history
  2. Move the models into the servlet classes

    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    61f8f25 View commit details
    Browse the repository at this point in the history
  3. Revert another status code change.

    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    296467e View commit details
    Browse the repository at this point in the history
  4. Merge branch 'develop' into dmr/rest/client/account

    Conflicts:
        poetry.lock from 8c60c57
        synapse/rest/client/account.py from fa71bb1
    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    94ca8d3 View commit details
    Browse the repository at this point in the history
  5. Relax pydantic version Bound

    - omit upper bound for caution's sake
    - Allow 1.9.0, which apparently makes life easier for downstream Debian
      packagers.
    
    Waiting on a further response from the packagers for other distros.
    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    a273870 View commit details
    Browse the repository at this point in the history
  6. Fix bad merge?

    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    07ba995 View commit details
    Browse the repository at this point in the history
  7. Argh, fix linter

    David Robertson committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    74cceab View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2022

  1. A few str -> StrictStr when TYPE_CHECKING

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    ff80b3f View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/develop' into dmr/rest/client/ac…

    …count
    
    Resolves conflicts with #13406.
    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    a256487 View commit details
    Browse the repository at this point in the history
  3. Use Pydantic 1.7.4

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    7294fc2 View commit details
    Browse the repository at this point in the history
  4. Update changelog

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    f20226e View commit details
    Browse the repository at this point in the history
  5. Require access token if id server is provided

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    df1f840 View commit details
    Browse the repository at this point in the history
  6. Ignore unused fields; create frozen instances

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    c4074aa View commit details
    Browse the repository at this point in the history
  7. Fix mypy

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    fefb0a8 View commit details
    Browse the repository at this point in the history
  8. Fix lint

    David Robertson committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    4dbafed View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2022

  1. Update changelog

    David Robertson committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    bd917d3 View commit details
    Browse the repository at this point in the history
  2. Add a missing strict=True.

    Really need a lint for this, see e.g. #13336
    David Robertson committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    f8f6037 View commit details
    Browse the repository at this point in the history
  3. Move the BaseModel subclass to synapse.rest

    and give it a rename to be a bit more specific
    David Robertson committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    c404f8f View commit details
    Browse the repository at this point in the history
  4. Try to break circular import?

    David Robertson committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    1597977 View commit details
    Browse the repository at this point in the history
  5. Fix lint durr

    David Robertson committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    22aee7a View commit details
    Browse the repository at this point in the history