element-hq / element-hq/synapse
Moving towards stronger schemas for response types
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13529](https://github.com/matrix-org/synapse/issues/13529).
---
We've recently had a number of issues with Synapse returning unspecced fields in API response that clients have ended up relying on.
There are two related questions here:
1. How do we ensure that our API responses match the spec?
2. Can we automatically detect in CI when we change an API response, so that we can flag that extra care must be taken?
Long term there is a desire to move to generating responses via swagger from the Spec.
Contributor guide
Research direction
Start by reviewing Synapse's API response-generation and schema-validation entry points, then compare them with the relevant Matrix API specification. Investigate how CI could detect response changes and how OpenAPI/Swagger generation would fit. Done means a decided, implementable approach for spec conformance and automated change detection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100