Re: [Specifications] API documentation limitations (#183)

> Somehow. CollectionSpecification is to enable API documentation to express how the items of the collections matches the manages block. It does not duplicate it - it just makes it possible to hook-up `hydra:manges` to API documentation - I don't thing this was doable before.

Ok, I get the goal and support it. Nevertheless I am not fine with just saying a CollectionSpecification is a Collection. Again for me this comes down to the meaning of "hydra:returns". We could say that the object of hydra:returns should always be some kind of Specification instead of a class.

If I just want to say it returns instances of a class this could look like that:
```json
{
  "hydra:returns": {
    "@type": "hydra:Specification",
    "hydra:specifies": {
      "property": "rdf:type",
      "object": "schema:Event"
    }
  }
}
```

"hydra:specifies" is inspired by "hydra:manages", as it serves a similar purpose -  describing what an operation returns and describing what's in a collection is quite similar to me.

Describing now, how a collection looks like, that is returned by an operation can get quite complicated, I see that, but possible:

```json
{
  "hydra:returns": {
    "@type": "hydra:Specification",
    "hydra:specifies": [
      {
        "property": "rdf:type",
        "object": "hydra:Collection"
      },
      {
        "property": "hydra:manages",
        "object": {
          "property": "rdf:type",
          "object": "ScreeningEvent"
        }
      }
    ]
  }
}
``` 
It's just a quick scribble, I don't want to propose it that way. It just seems to me, that the topic is more complicated and needs further thinking and discussing :/ And perhaps we need something like [SHACL](https://www.w3.org/TR/shacl/)?

-- 
GitHub Notification of comment by angelo-v
Please view or discuss this issue at https://github.com/HydraCG/Specifications/pull/183#issuecomment-463675355 using your GitHub account

Received on Thursday, 14 February 2019 15:42:54 UTC