Affects Version/s: 4.9.0
Fix Version/s: None
The REST API for repository creation allows the user to add any type of repository under a virtual repository of a specific type, thus creating invalid mixed-type virtual repos. The UI prevents this by limiting the repositories that can be included in a non-generic virtual repo.
1. Create repositories of different types in the UI, or via REST:
2. In the UI, attempt to create a virtual repository of type "maven." The UI will only allow you to add local and remote "maven" repositories.
3. Create a "maven" virtual repository via REST. It will allow you to add any type of repo:
4. Verify in the UI that all repos were added under the virtual.
5. Hit "save" on the virtual repo in the UI. UI throws an error: "Failed to update the repository." (See screenshot.)
Users expect to get an http 4xx error response back when attempting something invalid via REST.