Skip to content

Commit 3f671b0

Browse files
committed
Bump version and standardize API meta
Upgrade package version to 1.0.7 and normalize API response metadata across endpoints. Both root and products endpoints now include title and description fields, use an epoch millisecond timestamp for "time", and reorganize base_url placement; extraneous human-readable message fields were removed. Files changed: app/__init__.py, app/api/root.py, app/api/products.py.
1 parent afc262c commit 3f671b0

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""NX AI - FastAPI/Python/Postgres/tsvector"""
22

33
# Current Version
4-
__version__ = "1.0.6"
4+
__version__ = "1.0.7"

app/api/products.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def root() -> dict:
3939

4040
epoch = int(time.time() * 1000)
4141
meta = {
42+
"title": "Product List",
43+
"description": "from the products Postgres table",
4244
"version": __version__,
4345
"base_url": base_url,
44-
"time": time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()),
45-
"epoch": epoch,
46+
"time": epoch,
4647
"severity": "success",
47-
"message": f"{len(products)} products"
4848
}
4949
return {"meta": meta, "data": products}

app/api/root.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ def root() -> dict:
1313
base_url = os.getenv("BASE_URL", "http://localhost:8000")
1414
epoch = int(time.time() * 1000)
1515
meta = {
16-
"base_url": base_url,
16+
"title": "NX-AI says hi",
17+
"description": "This is the base_url",
1718
"version": __version__,
18-
"time": time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()),
19-
"epoch": epoch,
19+
"base_url": base_url,
20+
"time": epoch,
2021
"severity": "success",
21-
"message": f"NX AI says hello",
2222
}
2323
endpoints = [
2424
{"docs": "docs", "url": f"{base_url}/docs"},

0 commit comments

Comments
 (0)