For all objects that extend AbstractCollection, /rest/v0/${type}/ and /rest/v0/${type}/:id are automatically registered. For collections that are not a XAPI collection, such as users, simply add the getObjects and getObject methods in the class.
If the endpoint point to one object. (/rest/v0/users/1234/foo), the object will be automatically resolved (using getObject) and injected in res.locals.object
Description
POC for REST API redesign.
What about: tsoa?
For all objects that extend
AbstractCollection
,/rest/v0/${type}/
and/rest/v0/${type}/:id
are automatically registered. For collections that are not a XAPI collection, such as users, simply add thegetObjects
andgetObject
methods in the class. If the endpoint point to one object. (/rest/v0/users/1234/foo), the object will be automatically resolved (usinggetObject
) and injected inres.locals.object
/rest/v0/dashboard
/rest/v0/hosts
/rest/v0/hosts/:id
/rest/v0/users
/rest/v0/users/:id
/rest/v0/vms
/rest/v0/vms/foo
/rest/v0/vms/:id
/rest/v0/vms/:id/name_label
Checklist
[ ] expose an action
[ ] handle sync an async actions
[ ] handle
AbstractCollection
routes with user permission[ ] expose openapi + swagger docs
Commit
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
Changelog
CHANGELOG.unreleased.md
PR
Review process
Notes: