InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

WIP: Extend schema intro

Open matmair opened this issue 1 month ago • 5 comments

This adds a vendor extensions that helps with analyzing endpoints - would be very helpful for https://github.com/inventree/project-adr/issues/4

This is more of a POC than something that could be merged

matmair avatar Oct 19 '25 14:10 matmair

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

Name Link
Latest commit e355ef1c1c1e0ed22dbcfbe1d7b4d1a1a64b810f
Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/692cc147fbb6410008286a95

netlify[bot] avatar Oct 19 '25 14:10 netlify[bot]

Codecov Report

:x: Patch coverage is 51.85185% with 13 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 88.01%. Comparing base (bc5c306) to head (e355ef1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10628      +/-   ##
==========================================
- Coverage   88.03%   88.01%   -0.02%     
==========================================
  Files        1281     1281              
  Lines       57647    57670      +23     
  Branches     1997     1997              
==========================================
+ Hits        50747    50756       +9     
- Misses       6403     6417      +14     
  Partials      497      497              
Flag Coverage Δ
backend 89.62% <51.85%> (-0.03%) :arrow_down:

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

Components Coverage Δ
Backend Apps 92.00% <ø> (ø)
Backend General 93.79% <ø> (ø)
Frontend 70.39% <ø> (ø)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 19 '25 14:10 codecov[bot]

@SchrodingersGat @wolflu05 this is more meant for maintainers then normal users as it enables us to write jq or spectral rules to lint the API. Any thoughts on additional things that might be helpful? By default nothing changes

matmair avatar Oct 21 '25 20:10 matmair

@matmair how is this intended to be used?

SchrodingersGat avatar Oct 21 '25 21:10 SchrodingersGat

@matmair how is this intended to be used?

With this addition, a dev can set the config key, export the schema and then use any json/yaml tool to filter through the whole API to find issues like https://github.com/inventree/InvenTree/issues/8539 to ensure that the API works in a more uniform way.

Big picture, the goal is to create a set of rules that get run against the API spec to ensure all endpoints are working similar (ish).

matmair avatar Oct 21 '25 22:10 matmair