openvsx icon indicating copy to clipboard operation
openvsx copied to clipboard

webui: standardize API access

Open amvanbaren opened this issue 1 week ago • 3 comments

Create a consistent interface and minimize repetitive code.

amvanbaren avatar Dec 11 '25 18:12 amvanbaren

We should really make a distinction between api calls that will also be advertised on https://open-vsx.org/swagger-ui/index.html and API endpoints that are only intended to be used by the WebUI.

Ideally they should be in separate controller classes.

netomi avatar Dec 11 '25 19:12 netomi

@netomi you're referring to the server?

amvanbaren avatar Dec 11 '25 19:12 amvanbaren

yes exactly. I dont know about your preference, but I usually prefer to organize endpoints in smaller controller classes to be able to better grasp where things are located instead of having these uber classes that do everything and its hard to navigate in tem.

I understand the RegistryApi needs to capture everything that should be accessible by external users so that you have a single openapi spec for it, but the remaining endpoints should be organized by context imho.

netomi avatar Dec 11 '25 19:12 netomi