Validate license.spdx_id against spdx-license-ids - #193
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
api | 1898f85 | Commit Preview URL Branch Preview URL |
Aug 08 2026, 05:22 PM |
Contributor
There was a problem hiding this comment.
No issues found across 4 files
Requires human review: This changes the public License API shape by adding an optional spdx_id field that was previously rejected by the strict schema, so the client-visible request/response contract changes. That public-contract decision warrants human sign-off.
Re-trigger cubic
License.name stays free text, but a new optional spdx_id lets a submitter identify a license as a specific, current (non-deprecated) SPDX identifier rather than an arbitrary string. Validated with .refine() against the spdx-license-ids package rather than z.enum() so the public OpenAPI schema and generated client types stay a plain string instead of embedding a ~600-member literal union. No migration needed: the `license` column is an opaque JSON blob, so this is purely an additive schema change to what's stored in it. Adds coverage in extension-writes.test.ts: rejects an unknown or deprecated id, stores name+spdx_id together for a recognized license, and still accepts a license with no spdx_id for custom/proprietary submissions.
admdly
force-pushed
the
license-spdx-support
branch
from
August 8, 2026 17:22
81a0439 to
1898f85
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
License.namestays free text, but adds an optionalspdx_idso a submitter can identify a license as a specific, current (non-deprecated) SPDX identifier rather than an arbitrary string..refine()against thespdx-license-idspackage (current, non-deprecated ids only) rather thanz.enum(), so the public OpenAPI schema and generated client types stay a plainstringinstead of embedding a ~600-member literal union.licensecolumn is an opaque JSON blob, so this is purely an additive change to the shape stored in it.spdx_idis optional,nameis unchanged and still always populated, so every existing consumer readinglicense.namekeeps working unchanged.