Skip to content

server: /api/v3.1 base path is duplicated across seven files #628

Description

@thammel

Context & Motivation

One base path, defined once. All services share the same spec version, so a bump to
v3.2 should be a single edit in the Python code.

/api/v3.1 is repeated in seven files: the base_path defaults of
discovery.py, registry.py and repository.py, the ENV API_BASE_PATH of the
three Dockerfiles, and BASE_PATH in test_shells_asset_ids.py.

test/test_api_base_path.py guards these, but via a hand-maintained
FILES_TO_CHECK list.

Possible fix

Define DEFAULT_API_BASE_PATH in app/interfaces/base.py and import it in the
three interfaces and the test. The Dockerfiles cannot import it, so the guard
stays for them, with FILES_TO_CHECK reduced to the definition plus the three
Dockerfiles.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions