[Specifications] Hydra api demo, question about Collections

cr3a7ure has just created a new issue for https://github.com/HydraCG/Specifications:

== Hydra api demo, question about Collections ==
Should there be a reference to the type of members returned by a Colllection?
A client knocks, reads the apidoc and asks for all the issues, for example.
```
 "@id": "vocab:EntryPoint",
      "@type": "hydra:Class",
      "subClassOf": null,
      "label": "EntryPoint",
      "description": "The main entry point or homepage of the API.",
      "supportedOperation": [
        {
          "@id": "_:entry_point",
          "@type": "hydra:Operation",
          "method": "GET",
          "label": "The APIs main entry point.",
          "description": null,
          "expects": null,
          "returns": "vocab:EntryPoint",
          "statusCodes": []
        }
      ],
      "supportedProperty": [
        {
          "property": {
            "@id": "vocab:EntryPoint/issues",
            "@type": "hydra:Link",
            "label": "issues",
            "description": "The collection of all issues",
            "domain": "vocab:EntryPoint",
            "range": "http://www.w3.org/ns/hydra/core#Collection",
            "supportedOperation": [
              {
                "@id": "_:issue_create",
                "@type": "hydra:Operation",
                "method": "POST",
                "label": "Creates a new Issue entity",
                "description": null,
                "expects": "vocab:Issue",
                "returns": "vocab:Issue",
                "statusCodes": [
                  {
                    "code": 201,
                    "description": "If the Issue entity was created successfully."
                  }
                ]
              },
              {
                "@id": "_:issue_collection_retrieve",
                "@type": "hydra:Operation",
                "method": "GET",
                "label": "Retrieves all Issue entities",
                "description": null,
                "expects": null,
                "returns": "http://www.w3.org/ns/hydra/core#Collection",
                "statusCodes": []
              }
            ]
          },
          "hydra:title": "issues",
          "hydra:description": "The collection of all issues",
          "required": null,
          "readonly": true,
          "writeonly": false
        },
```

Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/119 using your GitHub account

Received on Tuesday, 25 April 2017 00:18:13 UTC