Skip to content

Expose ORPHAN_LOCATION via GET /v1/config#5

Merged
skullydazed merged 1 commit into
mainfrom
copilot/expose-orphan-location-api
May 31, 2026
Merged

Expose ORPHAN_LOCATION via GET /v1/config#5
skullydazed merged 1 commit into
mainfrom
copilot/expose-orphan-location-api

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

Clients have no way to know the server's configured orphan container label, making it impossible to surface the default or offer alternatives when deleting containers.

Changes

  • openapi.yaml — new GET /v1/config endpoint (bearer-auth required) returning a ServerConfig schema
  • routes.pyget_config() handler reads ORPHAN_LOCATION from Flask app config
  • tests/test_api_config.py — covers set value, null value, and unauthenticated access

Response shape

GET /v1/config
{ "orphan_location": "Lost and Found" }  // null when ORPHAN_LOCATION is unset

Copilot AI changed the title Expose ORPHAN_LOCATION via GET /v1/config endpoint Expose ORPHAN_LOCATION via GET /v1/config May 31, 2026
Copilot AI requested a review from skullydazed May 31, 2026 01:15
@skullydazed skullydazed marked this pull request as ready for review May 31, 2026 01:21
@skullydazed skullydazed requested a review from Copilot May 31, 2026 01:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new authenticated GET /v1/config endpoint that exposes the server's ORPHAN_LOCATION setting so clients can learn the configured orphan container label (returning null when unset).

Changes:

  • New get_config route handler reading ORPHAN_LOCATION from Flask config.
  • OpenAPI path /v1/config and ServerConfig schema (with orphan_location nullable string).
  • Tests covering set value, null value, and unauthenticated 401 response.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
routes.py Adds get_config() handler returning orphan_location from current_app.config.
openapi.yaml Declares the new GET /v1/config operation and ServerConfig schema; inherits the global bearerAuth requirement.
tests/test_api_config.py Adds tests for the set/null/unauthenticated cases using the existing app.app.config monkeypatch pattern.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skullydazed skullydazed merged commit 9f7f06f into main May 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants