-
-
Notifications
You must be signed in to change notification settings - Fork 6k
fix: add author.name field to Swift Package Registry API response #35410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add author.name field to Swift Package Registry API response #35410
Conversation
Fixes go-gitea#35159 Swift Package Manager expects an 'author.name' field in package metadata, but Gitea was only providing schema.org format fields (givenName, middleName, familyName). This caused SPM to fail with keyNotFound error when fetching package metadata. Changes: - Add 'name' field to Person struct (inherited from schema.org Thing) - Populate 'name' field in API response using existing String() method - Maintains backward compatibility with existing schema.org fields - Provides both formats for maximum compatibility The fix ensures Swift Package Manager can successfully resolve packages while preserving full schema.org compliance.
Maybe add some tests here ?
|
It seems this only resolves the issue when retrieving package information, but not when uploading a package. |
@lunny before I finalize the fix, I want to clarify the intended behavior for the Should it be:
Which approach aligns better with Gitea's design? |
I guess the design could be this one? As long as end users can provide the "name" field, then use the value provided by them. |
3cb1899
to
ae68917
Compare
…-gitea#35410) Fixes go-gitea#35159 Swift Package Manager expects an 'author.name' field in package metadata, but Gitea was only providing schema.org format fields (givenName, middleName, familyName). This caused SPM to fail with keyNotFound error when fetching package metadata. Changes: - Add 'name' field to Person struct (inherited from https://schema.org/Thing) - Populate 'name' field in API response using existing String() method - Maintains backward compatibility with existing schema.org fields - Provides both formats for maximum compatibility The fix ensures Swift Package Manager can successfully resolve packages while preserving full schema.org compliance.
…5410) (#35431) Backport #35410 by ahanoff Fixes #35159 Swift Package Manager expects an 'author.name' field in package metadata, but Gitea was only providing schema.org format fields (givenName, middleName, familyName). This caused SPM to fail with keyNotFound error when fetching package metadata. Changes: - Add 'name' field to Person struct (inherited from https://schema.org/Thing) - Populate 'name' field in API response using existing String() method - Maintains backward compatibility with existing schema.org fields - Provides both formats for maximum compatibility The fix ensures Swift Package Manager can successfully resolve packages while preserving full schema.org compliance. Co-authored-by: Akhan Zhakiyanov <[email protected]>
* giteaofficial/main: fix: add author.name field to Swift Package Registry API response (go-gitea#35410) Update js dependencies (go-gitea#35429) Support Node.js 22.6 with type stripping (go-gitea#35427) [skip ci] Updated translations via Crowdin apply as maintainer (go-gitea#35424) Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (go-gitea#35418) Migrate tools and configs to typescript, require node.js >= 22.18.0 (go-gitea#35421) [skip ci] Updated translations via Crowdin Switch to `@resvg/resvg-wasm` for `generate-images` (go-gitea#35415) fix(webhook/discord): fixed username cannot be empty error (go-gitea#35412) add `/.pnpm-store` to .gitignore (go-gitea#35414)
Fixes #35159
Swift Package Manager expects an 'author.name' field in package metadata, but Gitea was only providing schema.org format fields (givenName, middleName, familyName). This caused SPM to fail with keyNotFound error when fetching package metadata.
Changes:
The fix ensures Swift Package Manager can successfully resolve packages while preserving full schema.org compliance.