Hello.
I have a few questions regarding TMF630 part 2.
In chapter 1. Polymorphic Collections and Types on page 5 after some examples the following is written:
All operations SHOULD be relative to the base types.
Other collections MAY be used at the discretion of the API Designer. In this case the operations exposed on the base collection may or may not be present on the derived collection.
Example:
• GET /resource/42?@type=Link
• GET/ logicalResource/42?@type=Link
• GET /link/42
An entity MUST declare in the Header the alternative URI that can be used to identify it. E.g / link/42 for
a logical resource of type link.
ID MUST always be relative to the base collection.
I don't understand the fragment about other collections and operations being relative to base types.
I assume operations mean basically CRUD done by HTTP, that is GET, POST and so on.
Lets assume we have the following inheritance tree, like in the guidelines:
There exists a colleciton for logicalResource, on which I can perform operations. Howerver, what about collecitons for types derived from logicalResource? Is this example, there is only one base type, that is logicalResource. Does it mean that collections for derived types, TPE and Link are optional, and as is written, MAY be used at the discretion of API designer? If so, what does it mean that not all operations present on base type collection may be present on the derived colleciton? Does it mean that GET doesn't have to be implemented on collection for link? Or maybe I don't understand what operations are in this context?
Also, I want to make sure that I understand one thing correctly - any changes to the model, like creating subclasses, adding states not present in the base API specification are meant to be included in the final API definition shipped by the implementing company? So there cannot be a situation, where there is a @type which is not included in the API definition?
------------------------------
Piotr Ledwoń
Suntech S.A.
------------------------------