Currently, an url has to be provided to create an origin. This url is then the origin name/identifier.
The base loader constructor takes as input an url. This url is used to get or create the origin and is also used to fetch the artifact that has to be loaded.
In the functional package loader, we provide to the loader constructor the url https://nix-community.github.io/nixpkgs-swh/sources-unstable.json. This url is used as origin name and to fetch the sources.json (which contains all sources to load).
However, I think it would be nice to be able to distinguish the name of the origin from the url used to fetch the artifact. The former needs to be immutable while the latter is now longer useful once the loader has done its job.
In the context of the functional package loader, I would like to be able to change the sources.json location url without changing the name of the origin (I actually would like to set the origin name as part of the sources.json file itself).
Concretely, I'm interested in asking the API for the origin nixos-release-19.09 while the location of the sources.json file is not important.
Note also the Debian package loader doesn't use an existing url as origin url since it looks like deb://....
What about allowing arbitrary strings for the name of an origin?