Skip to content

init API endpoint for generating labels#1234

Open
MayNiklas wants to merge 1 commit intoPart-DB:masterfrom
MayNiklas:labels-via-api
Open

init API endpoint for generating labels#1234
MayNiklas wants to merge 1 commit intoPart-DB:masterfrom
MayNiklas:labels-via-api

Conversation

@MayNiklas
Copy link
Contributor

Good evening!
I now finished cleaning up the API endpoint for generating labels feature I wrote about.

This time, I had some issues during development and used LLM's to fix those issues (I'm not really a PHP guy - this is my the first PHP project I'm working on in years). Therefore, please be extra careful in review!
If you don't like something, feel free to request changes or make them yourself (I allowed edits by maintainers).

I'm looking forward to receiving feedback.

I'm planning on using this feature by scripting a tool, that quickly requests labels and automatically prints them with my label printer. Maybe when scanning a LCSC bag with a scanner?

curl -X 'POST' \
  'http://localhost:9091/api/labels/generate' \
  -H 'accept: application/ld+json' \
  -H 'Content-Type: application/json' \
  -d '{
  "profileId": 1,
  "elementIds": "1,2,5-10",
  "elementType": "part"
}'

Greetings,
MayNiklas

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 78.94737% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.77%. Comparing base (c2a51e5) to head (cfbe2f7).

Files with missing lines Patch % Lines
src/State/LabelGenerationProcessor.php 78.94% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1234      +/-   ##
============================================
+ Coverage     54.72%   54.77%   +0.04%     
- Complexity     7918     7929      +11     
============================================
  Files           596      597       +1     
  Lines         25468    25506      +38     
============================================
+ Hits          13937    13970      +33     
- Misses        11531    11536       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant