basyx-python-sdk icon indicating copy to clipboard operation
basyx-python-sdk copied to clipboard

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

Open thammel opened this issue 2 months ago • 2 comments

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.

thammel avatar Sep 10 '26 09:09 thammel

This should be already fixed with #610, no? Can you shortly confirm please?

s-heppner avatar Sep 15 '26 07:09 s-heppner

This has been done in c1af27c3. I'll close this as duplicate of #548, namly stated in this comment.

s-heppner avatar Sep 21 '26 12:09 s-heppner