Add KiCad HTTP Library API v2 with volatile field support#1260
Open
Sebbeben wants to merge 1 commit intoPart-DB:masterfrom
Open
Add KiCad HTTP Library API v2 with volatile field support#1260Sebbeben wants to merge 1 commit intoPart-DB:masterfrom
Sebbeben wants to merge 1 commit intoPart-DB:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1260 +/- ##
============================================
+ Coverage 55.41% 55.58% +0.16%
- Complexity 8268 8281 +13
============================================
Files 610 612 +2
Lines 26519 26590 +71
============================================
+ Hits 14696 14780 +84
+ Misses 11823 11810 -13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5 tasks
c1cb018 to
4427ba8
Compare
- New KiCadApiV2Controller at /kicad-api/v2/ endpoints - Root endpoint returns links to categories endpoint (per v2 spec) - Volatile fields: Stock and Storage Location are shown in KiCad but NOT saved to schematic (v2 spec feature) - int $apiVersion parameter on KiCadHelper::getKiCADPart() with version validation (supports v1 and v2) - createField() supports $volatile parameter for v2 fields - Full test coverage for v2 controller endpoints v2 spec (draft): https://gitlab.com/RosyDev/kicad-dev-docs/-/blob/http-lib-v2/content/apis-and-binding/http-libraries/http-lib-v2-00.adoc
4427ba8 to
dc1754b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds KiCad HTTP Library API v2 support with volatile field support, split out from #1241 as discussed.
The v2 spec introduces volatile fields — fields that are shown in KiCad's UI but NOT saved to the schematic. This is ideal for dynamic data like stock quantity and storage location.
Changes
KiCadApiV2Controller.php/kicad-api/v2/with root, categories, category parts, and part detail endpointsKiCadHelper.phpint $apiVersionparameter togetKiCADPart(),$volatileparameter tocreateField()KiCadApiV2ControllerTest.phpV2 API differences from V1
volatile: True(shown in KiCad, not saved to schematic)volatile: TrueV2 spec reference
Note
This PR is intentionally minimal — only the v2-specific additions. The underlying KiCad improvements (batch EDA editing, parameter export, populate command, etc.) were merged in #1241. This can be merged once the v2 spec is finalized, or kept as a draft until then.