Skip to content

fix(api): reject empty label on PATCH /stamps/{batch_id}#5512

Merged
martinconic merged 1 commit into
masterfrom
fix/stamps-label-required
Jun 22, 2026
Merged

fix(api): reject empty label on PATCH /stamps/{batch_id}#5512
martinconic merged 1 commit into
masterfrom
fix/stamps-label-required

Conversation

@martinconic

@martinconic martinconic commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

PATCH /stamps/{batch_id} accepts an empty or missing label and returns 200, silently blanking the issuer's label — even though the OpenAPI spec marks label as required.

Fixing #5510

Fix

Reject an empty/whitespace-only label with 400 "label is required". This makes the handler match the spec (which already requires label), so no OpenAPI change is needed. The happy path ({"label":"name"}) is unchanged.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@martinconic martinconic merged commit f5d0b4b into master Jun 22, 2026
22 of 23 checks passed
@martinconic martinconic deleted the fix/stamps-label-required branch June 22, 2026 08:41
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.

3 participants