Closed RaySinnema closed 9 years ago
A data model is not the same thing as a message, it is just one of the things that a message represents. Also, a message is a representation, a data model is abstract and can be represented by multiple media types. I think renaming the element to message is more confusing than the status quo.
How about naming it properties
? We'd have to do some schema fu to make sure things like examples
are only valid on the top-level properties
.
Note that this is a breaking change.
I think that would be helpful. One of the reasons data-model is confusing is that it's not at all clear how it is related to properties, and why we need both.
+1. properties
is more close to its mission.
But what do we call the wrapper around all the various properties
elements, i.e. what is now called data-models
?
OK, "message" is really not a good term. I was trying to remove any confusion with "data" as "stored in a database" and tried to emphasize that we're talking about information exchanged between client and server. But "message" suggests something that goes over the wire as an actual HTTP body, which is not what I meant either. We're trying to capture the abstract structure of the information that is exchanged, with "abstract" meaning the informational value rather than the concrete serialization in a media type.
I fear that the term
data-model
may confuse some people. They are not about persistent data storage, or even about domain objects, but they describe what the messages look like that are sent over the wire. To make that clearer, we should rename<data-model>
to<message>
.