Skip to content

Commit 1dbab98

Browse files
committed
Remove description and message from API meta
Remove the 'description' and 'message' fields from the meta objects in the root and products endpoints and move the 'severity' key for consistent ordering. This standardizes the response meta payloads and removes redundant/static text (e.g., 'Welcome to NX AI!'); no other behavior changes were made.
1 parent 940d2bf commit 1dbab98

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

app/api/products/products.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ def root() -> dict:
3939

4040
epoch = int(time.time() * 1000)
4141
meta = {
42+
"severity": "success",
4243
"title": "Product List",
43-
"description": "from the products Postgres table",
4444
"version": __version__,
4545
"base_url": base_url,
4646
"time": epoch,
47-
"severity": "success",
4847
}
4948
return {"meta": meta, "data": products}

app/api/root.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ def root() -> dict:
1313
base_url = os.getenv("BASE_URL", "http://localhost:8000")
1414
epoch = int(time.time() * 1000)
1515
meta = {
16+
"severity": "success",
1617
"title": "NX-AI says hi",
17-
"description": "This is the base_url",
1818
"version": __version__,
1919
"base_url": base_url,
2020
"time": epoch,
21-
"severity": "success",
22-
"message": "Welcome to NX AI!"
2321
}
2422
endpoints = [
2523
{"name": "docs", "url": f"{base_url}/docs"},

0 commit comments

Comments
 (0)