3
11

Extensions: use a new structure for the server's JSON listing #29

Closed
Campbell Barton wants to merge 4 commits from test-refactor-server-json into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 6e9b246865 - Show all commits

View File

@ -1138,7 +1138,7 @@ def repo_pkginfo_from_local(*, local_dir: str) -> Optional[Dict[str, Any]]:
def pkg_repo_dat_from_json(json_data: Dict[str, Any]) -> PkgRepoData:
result_new = PkgRepoData(
version=json_data.get("version", "1"),
version=json_data.get("version", "v1"),
ideasman42 marked this conversation as resolved Outdated

a minor concern, but let's finalize this before publishing the doc

in

'version': 'v1',
(the branch for the server changes) I started using "v1" for the version string

I 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?

a minor concern, but let's finalize this before publishing the doc in https://projects.blender.org/infrastructure/extensions-website/src/commit/11e2dea9f6ad6f8d470f0d4d1aa335cca3900c89/extensions/views/api.py#L105 (the branch for the server changes) I started using `"v1"` for the version string I 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.

That seems fine, I don't have such a strong opinion on this.
blocklist=json_data.get("blocklist", []),
data=json_data.get("data", []),
)