Support API and patch versions in charmhub fetch_library and fetch_libraries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
New
|
Undecided
|
Unassigned |
Bug Description
More details: https:/
The `fetch-library` charmhub endpoint should accept an api and optional patch version, like so:
```
/v1/<namespace>
```
If patch is provided, api is necessary; however, if api is provided without providing patch, it will retrieve the latest revision that matches that api version.
Likewise for `fetch_libraries` it should be able to accept JSON like this:
```
[
{
"charm-name": "some-charm",
"library-name": "latest-lib",
},
{
"charm-name": "some-charm",
"library-name": "api-specified",
"api": 1,
},
{
"charm-name": "some-charm",
"library-name": "api-and-
"api": 1,
"patch": 0
}
]
```
with the same requirements as `fetch_library`