Every OData Service will provoide metadata document?

自作多情 提交于 2019-12-12 06:17:51

问题


I'm a little bit confused that metadata doucment in OData Service. As odata-v4.0-part1-protocol doc mentioned, there are two well-defined resources that describe its data model, a service document and a metadata document.

I want to know if that means both of these two resources must be implemented during development of OData Services, or developers just only need to implement one of them by their own choices?

I do appreciate anyone's help. Thanks


回答1:


Not necessarily. According to the "13.1 OData Service Conformance Levels" of OData V4 spec:

  • for minimal conformance level "MAY publish metadata at $metadata according to [OData-CSDL] "
  • for intermediate conformance level " SHOULD publish metadata at $metadata according to [OData-CSDL]"
  • for advanced conformance level "MUST publish metadata at $metadata according to [OData-CSDL]".

In other word, this means metadata is NOT a must for OData V4 service but service document is a MUST. If you have a deeper understand of OData, there are two kinds of OData libraries -- server and client, the metadata document of OData is for advanced client to know more about the service(models, types and so on). So having metdata document or not actually depends on whether you want your service to be talked to as much clients as possible.



来源:https://stackoverflow.com/questions/28934473/every-odata-service-will-provoide-metadata-document

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!