Extensions: use a new structure for the server's JSON listing #29
No reviewers
Labels
No Label
No Milestone
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons-contrib#29
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "test-refactor-server-json"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Top level keys are now:
version
blocklist
data (a list of packages)
Each list item now contains the package "id".
56e1be217f
to295d684561
@ -1128,1 +1139,3 @@
def repo_pkginfo_from_local_with_idname_as_key(*, local_dir: str) -> Optional[PkgManifest_RepoDict]:
def pkg_repo_dat_from_json(json_data: Dict[str, Any]) -> PkgRepoData:
result_new = PkgRepoData(
version=json_data.get("version", "1"),
a minor concern, but let's finalize this before publishing the doc
in
"v1"
for the version stringI don't mind changing this to
"1"
, but having a prefix makes it impossible to mistake the string for a number, and it also subjectively looks nicer in the explicitly versioned urls, such as https://extensions.blender.org/api/v1/extensions/what do you think?
That seems fine, I don't have such a strong opinion on this.
295d684561
toeb37be857c
I'm running into this error:
My JSON file is:
@ -1025,0 +1025,4 @@
yield None
else:
for item_remote in json_items:
pkg_manifest_remote[item_remote.pop("id")] = item_remote
For this to work I had to create a copy:
I didn't investigate on why it happens, but it does happen.
Pushed similar fix with comment, strange I didn't run into this when testing.
Committed
ebcda465b5