Some questions about Hydra's terms

时间:2015-09-01 22:35:09

标签: json-ld hypermedia hydra-core

I'm working on a Hydra documentation generator for Golang. I've been using the demo as an example and I was wondering about the ambiguity in some hydra terms.

  • What's the difference between hydra:title and rdfs:label? label is used in vocab:User, but hydra:title is used for Resource and Collection, as well as in properties.
  • Speaking of Resource and Collection, why are they re-described in this ApiDocumentation? Shouldn't they be part of hydra/core?
  • In many properties, there's both a hydra:title + hydra:description and label + description that contain the same information. Why is that? Can I ignore one and be fine?

Apologies in advance if I failed to spot that in the spec, but I've only recently gained an interest in hypermedia APIs and many concepts are still a bit hazy.

1 个答案:

答案 0 :(得分:1)

  

•hydra:title和rdfs:label?

之间有什么区别?

rdfs:label用于词汇表定义本身。 hydra:title用于覆盖Hydra客户端中的标签(例如,使用它来呈现表单)。当Hydra的进一步发展进入W3C Community Group时,这是第一个被开放的问题:Hydra ISSUE-1

  

•说到资源和收集,为什么在这个ApiDocumentation中重新描述它们?它们不应该成为水/核心的一部分吗?

它们是Hydra核心词汇表的一部分。因此,没有必要重新描述它们。这是我采用的实施捷径。

  

•在许多属性中,都有一个hydra:title + hydra:描述和标签+描述,包含相同的信息。这是为什么?我可以忽略一个并且没事吗?

查看第一个问题的答案。通常,您应该更喜欢Hydra特定工具中的Hydra版本,但可以使用rdfs属性。

顺便说一下。有一个专门的Hydra邮件列表。 Join the W3C Community Group如果您有兴趣影响Hydra的未来发展。你也应该在那里宣布你的文档生成器。