[Feature] Consider versioning the API

Open
#5,661 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
22/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
fastapi, python

Research direction

This is a design proposal with maintainer-facing open questions, not a scoped change. Start by reading CONTRIBUTING.md and anything under docs/ about the API, then locate the heartbeat/health endpoint and the FastAPI app setup to see where a version string could be exposed. Done means a published compatibility policy plus, if accepted, an API version surfaced in health and deprecated/Sunset markers on routes; agree on the RFC 9745/8594 approach before writing code.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.
RomM is blossoming, doing the hard work that a lot of front-ends would prefer to avoid. However, it may need to version and deprecate features behind its API. Currently, the only version is the current version and it's always moving.

This proposal is ultimately a product choice for maintainers.

Describe the solution you'd like

1. Publish a compatibility policy first.

Publish it in docs/, linked from CONTRIBUTING.md.
Outline what Breaking, Not Breaking, and rules surrounding changing the API's surface.
It's just a document update.
We can actually do this right now, no worry about 5.5. Doesn't change anything.

2. Keep the URLs unversioned, but expose the API's version in heartbeat or health.

This means nobody has to update all their URLs! Yeach, who wants to do that?
But we do put our API version in a place systems and users can see. So it IS versioned, just not in the path. Easy! Now we have a version! No breaking changes.
We can actually add the API version either right now or after 5.5.

3. Add deprecated=True when needed.

FastAPI supports this, and so does swagger.

There are pre-existing standards for this convention:
RFC 9745, Deprecation (March 2025). It marks a resource as deprecated and says when. It changes no behaviour.
RFC 8594, Sunset. A date after which the resource is likely to stop responding. RFC 9745 says it must not be earlier than the Deprecation date, and clients should treat it as a hint.

Open Questions for Maintainers:

Do you want to make a promise to your third parties? Do you want to commit resources to API changes as you release new versions?

Should you introduce CLI checks that verify we don't introduce breaking changes inadvertently?

Additional context
From the discords:
image

Dominant language
Python
Stars
13.3k
Forks
747
Avg merge
20h 58m
Merged PRs (30d)
207

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rommapp/romm

All issues in rommapp/romm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.