Re: Hydra Schema

Hi Istiaq,

Yes, you are correct, https://www.w3.org/ns/hydra/core is the only
schema/ontology provided by the Hydra Community Group.

The format, JSON-LD <https://json-ld.org/>, may be unfamiliar if you are
used to using formats like Turtle, N-Quads/Triples, or RDF/XML.

One option would be to use a tool to convert from JSON-LD to another
format. The JSON-LD playground <https://json-ld.org/playground/> can do
this. (paste in JSON-LD and then click the N-Quads tab).

However, that endpoint also responds with
the following available variants, by extension and MIME type from the
Accept header:
- core.jsonld, application/ld+json
- core.ttl, text/turtle
- core.jsonld, */*

This means if you issue a GET request to https://www.w3.org/ns/hydra/core
with an Accept header of text/turtle, you'll receive the response in the
Turtle format, which may be more helpful for the tools you're using.

Best of luck,
Alex


On Sun, Nov 8, 2020 at 3:19 PM Tomasz Pluskiewicz <tomasz@t-code.pl> wrote:

> Hello
>
> Good to hear you’re using Hydra! Hope we will more from you as your
> project progresses.
>
> Now, I am not sure what you are trying to achieve. Hydra vocabulary is
> used predominantly to describe the API (in the form of ApiDocumenatation
> resource) as well as extend the representations to a degree (such as when
> you use the Collection class or inline hydra operations).
>
> The latter case is mostly to extend the representations send to the
> clients and would rarely have much impact on the requests coming back to
> the API.
> It’s like with the case of HTML Forms. The markup defines what kind of
> input it collect on a web page but it is typically not used by the server
> to validate the actual requests that originates from any given HTML form.
>
> If you are looking for way to validate the request payloads you could
> check SHACL. [1] You can trivially extend you ApiDocumentation to provide
> shapes which a an operation’s payload must conform to. It seems that SHACL
> will not likely become an integral part of Hydra, and could even be used
> completely independently if request validation is all you need (ie. without
> the client knowing). You might still refer to the issues #214 [2] and #215
> [3] for some inspiration and discussion.
>
> Best,
> Tom
>
> [1]: https://www.w3.org/TR/shacl/
> [2]: https://github.com/HydraCG/Specifications/issues/214
> [3]: https://github.com/HydraCG/Specifications/issues/215
>
> On 8 November 2020 at 21:02:24, Istiaq Hasan (
> istiaq.hasan@stud.uni-bamberg.de) wrote:
> > Hello Team,
> >
> > I am Istiaq Hasan, a student from University of Bamberg, Germany.
> >
> > I am using Hydra hypermedia in a project. I want to validate a response
> of a request against
> > the schema. I was looking for the Hydra schema unfortunately, I couldn't
> find one.
> >
> > I am wondering, https://www.w3.org/ns/hydra/core can be used as Hydra
> schema or not.
> > If this can't be used as Hydra Schema, it would be great if you can
> provide the link of Hydra
> > Schema.
> >
> > I am looking forward to hearing from you.
> >
> > Kind Regards,
> > Istiaq Hasan.
> >
> >
> >
>
>
>

Received on Monday, 9 November 2020 22:59:23 UTC