Implement the mecanism to expose non XAPI object endpoints:
Added a new type, NonXapiXoRecord, which represents all XO objects that are not XAPI objects (e.g., users, servers, groups, etc.).
Split XapiXoController to create BaseController, allowing code reuse between XapiXoController and the new XoController.
BaseController exposes sendObjects and createAction (unchanged) and enforces subclasses to define the getObject and getObjects methods.
XoController requires subclasses to implement getAllCollectionObjects and getCollectionObject, as these are used in its getObjects and getObject methods.
filter and limit are handled by xo-server for XAPI objects. XoController implements its own filter and limit mechanisms for all non XAPI object in getObjects
And finally expose /rest/v0/servers and /rest/v0/servers/<server-id>🥳
@vates/types Added an export to the root of the lib because TSOA requires importing the type from the root library to generate the OpenAPI specification
@vates/types Tuples ([number, number]) throw errors when generating the OpenAPI specification. They have been updated to number[]
@vates/types Created a XapiXoRecord to be able to differentiate between XO types that come from xapi-object-to-xo and XO types that come from XO collections
xo-server Added getObjectsByType to avoid iterating over all XAPI objects when we know what type of object we want
Branded is not a valid type for the OpenAPI spec. I created a Unbrand type, that convert all Branded to string . (Use Unbrand only for OpenAPI specification definition to maintain Branded type safety)
Added another error middleware to catch TSOA errors and throw XO errors
Added a README.md to have consistency of order in the use of decorators
Document how to restore a file from a VHD with fuse-vhd CLI.
This will allow users to restore by themselves large files that make the restore fail when done from the UI.
Configure dependency injection + configure authentication middleware for openapi (copy of what actually exists in the current REST API. Will be improved later when implementing ACL/resource set)