Skip to content

feat(backend): add inventree version to every response#11611

Merged
SchrodingersGat merged 2 commits intoinventree:masterfrom
matmair:feat(backend)--add-inventree-version-to-response-object
Mar 29, 2026
Merged

feat(backend): add inventree version to every response#11611
SchrodingersGat merged 2 commits intoinventree:masterfrom
matmair:feat(backend)--add-inventree-version-to-response-object

Conversation

@matmair
Copy link
Copy Markdown
Member

@matmair matmair commented Mar 27, 2026

Having a header with the version on response objects helps with making client-side checks for correct parsing easier and can help reduce the number of required calls in stateless CLI usage as there is no need to call /api/ to determine API version.

@matmair matmair added this to the 1.3.0 milestone Mar 27, 2026
@matmair matmair self-assigned this Mar 27, 2026
@matmair matmair added backport Apply this label to a PR to enable auto-backport action feature backport-to-1.2.x labels Mar 27, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit c35fd0d
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/69c62ac0712f0d0008a9932b

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.44%. Comparing base (100555c) to head (c35fd0d).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11611   +/-   ##
=======================================
  Coverage   91.43%   91.44%           
=======================================
  Files         962      962           
  Lines       49754    49762    +8     
=======================================
+ Hits        45495    45503    +8     
  Misses       4259     4259           
Flag Coverage Δ
backend 89.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend Apps 91.71% <ø> (ø)
Backend General 93.40% <ø> (ø)
Frontend ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
Copy link
Copy Markdown
Member

What about adding the API version also?

@matmair
Copy link
Copy Markdown
Member Author

matmair commented Mar 27, 2026

Done @SchrodingersGat

@SchrodingersGat
Copy link
Copy Markdown
Member

LGTM, nice addition thanks @matmair

@SchrodingersGat SchrodingersGat merged commit e3c9a35 into inventree:master Mar 29, 2026
37 checks passed
@SchrodingersGat SchrodingersGat deleted the feat(backend)--add-inventree-version-to-response-object branch March 29, 2026 03:27
@SchrodingersGat SchrodingersGat added the api Relates to the API label Mar 29, 2026
github-actions bot pushed a commit that referenced this pull request Mar 29, 2026
* feat(backend): add inventree version to every response

* add more info

(cherry picked from commit e3c9a35)
@github-actions
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
1.2.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat pushed a commit that referenced this pull request Mar 29, 2026
* feat(backend): add inventree version to every response

* add more info

(cherry picked from commit e3c9a35)

Co-authored-by: Matthias Mair <code@mjmair.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API backport Apply this label to a PR to enable auto-backport action backport-to-1.2.x feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants