Repository navigation
ci(release): v11 - #484
Merged
Merged
ci(release): v11#484
Conversation
…ype-based-serialization refactor(requests)!: serialize body parameters by value type, not by parameter name
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…ds from the spec (#487)
…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
…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
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.
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
JsonUtilhelpers, 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.mdmaps 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 incodegen/requests.yamlplus a run of the generator, and the checks catch what a person scanning the diff might miss.