← 输入框|github.com|刷新
Skip to content

ci(release): v11 - #484

Merged
dargmuesli merged 23 commits into
mainfrom
beta
Nov 19, 2026
Merged

dargmuesli merged 23 commits into
mainfrom
beta

Conversation

@dargmuesli

@dargmuesli dargmuesli commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

⚠️ Breaking changes

What 11 means

For its first ten major versions this library was a hand-maintained mirror of the Spotify Web API. Someone read the online reference, wrote the request class, and kept it in step as the API moved. It worked, but the mirror and the original could drift, and every bit of drift had to be found and corrected by hand, exactly the way it was made.

Version 11 changes the relationship. The data request API is now generated from Spotify's OpenAPI specification, so the library is no longer a mirror that someone tends; it is a projection that is derived. The work flips from keeping two things in sync to making it so they cannot disagree. When the spec changes, the library follows by re-running the generator, and CI fails if the committed classes ever drift from what the spec says. Keeping the library correct stops depending on diligence and starts depending on structure.

The same impulse strips out what 10.x only deprecated: the JsonUtil helpers, the Gson overloads, the re-exported Gson dependency. All of it is gone because the spec does not ask for it and nothing in the library calls it anymore. What is left is exactly the API and nothing more, which is a smaller place for the two to disagree and one that is checked rather than assumed.

For users the payoff is predictability: the surface reads exactly as Spotify documents it, the values the spec rejects are rejected here too, with assertions, before a request is sent, and MIGRATION.md maps every removed or renamed call to its replacement. For contributors it is a lower floor and a higher ceiling: a new endpoint is one line in codegen/requests.yaml plus a run of the generator, and the checks catch what a person scanning the diff might miss.

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.10%. Comparing base (5d0e069) to head (ab0821d).

Additional details and impacted files
@@              Coverage Diff              @@
##               main     #484       +/-   ##
=============================================
- Coverage     47.23%   37.10%   -10.13%     
+ Complexity      721      509      -212     
=============================================
  Files           212      106      -106     
  Lines          6195     4282     -1913     
  Branches        574      196      -378     
=============================================
- Hits           2926     1589     -1337     
+ Misses         2890     2603      -287     
+ Partials        379       90      -289     

☔ View full report in Codecov by Harness.
📢 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.

Comment thread apidocs/script-files/search.js Dismissed
…java

The 106 generated data request classes keep their package, so nothing
changes for callers: src/generated/java now holds them, src/main/java
keeps the hand-written request infrastructure, and pom.xml adds the root
via build-helper-maven-plugin, which the compiler and the Javadoc pick
up from the compile sources.

codegen/generate.py writes to the new root, ci/check-docs.py scans both
roots, and AGENTS.md, CONTRIBUTING.md and README.md note the two-root
layout.
The generated request classes are pinned by codegen/generate.py --check,
and their optional setter boilerplate is exercised only where a fixture
uses the parameter, so counting it toward coverage reports a gap the
tests cannot close without covering every setter.
Every model's nested JsonUtil, AbstractModelObject.JsonUtil and
IModelObject.IJsonUtil were deprecated in 10.x in favour of ModelObjects and
no longer used by the library. PlaylistItemFactory goes with them: its only
method took a Gson JsonObject, and the reader now lives in the internal
ModelObjectGson, so the model_objects.utils package is no longer exported.

MIGRATION.md maps each removed call to its ModelObjects replacement.

Refs #461
…rated-source-root

refactor(build): move the generated request classes to src/generated/java
…ove-json-util

refactor(models)!: remove the deprecated JsonUtil classes
With the JsonUtil classes removed and request bodies taking List and Map, no
public signature takes or returns a Gson type anymore, so callers no longer
need to read Gson through this module. Gson stays a regular Maven
dependency; only a module that uses Gson itself without requiring it has to
add its own requires.

Refs #461
…n-requires

refactor(module)!: require Gson without re-exporting it
# Conflicts:
#	README.md
The code overview moved from the README on main, where requests are still
written by hand. On beta they are generated, so the overview now says where
the generated classes and SpotifyApi methods live and which two requests
stay hand-written, and the development setup lists the Python and PyYAML
the generator needs, with its commands.
…odegen

docs(contributing): describe the generated request classes
@dargmuesli
dargmuesli requested a review from Selbi182 November 5, 2026 13:47
…endored-spec

docs(contributing): move the vendored spec convention into CONTRIBUTING.md
…rams

fix(codegen)!: send a parameter offered in both query and body in the body
# Conflicts:
#	AGENTS.md
#	CONTRIBUTING.md
@dargmuesli
dargmuesli marked this pull request as ready for review November 19, 2026 09:36
@dargmuesli
dargmuesli merged commit 02fabc9 into main Nov 19, 2026
21 checks passed
@dargmuesli
dargmuesli deleted the beta branch November 19, 2026 09:36
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.

2 participants