schemaorg / suggestions-questions-brainstorming

Suggestions, questions, and brainstorming
19 stars 15 forks source link

edits to action.html web page #63

Open smrgeoinfo opened 5 years ago

smrgeoinfo commented 5 years ago

I'm trying to understand the approach to WebAPI descriptions using potential actions, studying https://schema.org/docs/actions.html. In the "Example: Movie review site API with -input and -output" section, there is: description

{
  "@context": "http://schema.org",
  "@type": "ReviewAction",
  "target": {
    "@type": "EntryPoint",
    "urlTemplate": "https://api.example.com/review",
    "encodingType": "application/ld+json",
    "contentType": "application/ld+json"
  },
  "object" : {
    "@type": "Movie",
    "url-input": "required",
  },
  ......
}

And an example request: Request

POST https://api.example.com/review
{
  "@context": "http://schema.org",
  "@type": "ReviewAction",
  "object" : {
    "@id": "http://example.com/movies/123"
  },
...
}

Shouldn't the object have a url property to match the "url-input" in the description?
so the object in the Request would be

 "object" : {
    "@type": "Movie",
    "url": "http://example.com/movies/123"
  },

Also, since the request is a POST, shouldn't the description include

"target": {
    "@type": "EntryPoint",
    "httpMethod": "POST",
   ...  

Since there are no parameters in the URI template, but some input must be provided by a request, it would appear that the service requires a POST request? Is "object" necessary if the ur template has parameters, in which case they are specified using query-input/PropertyValueSpecification?

Please see comments in the example doc at https://github.com/earthcubearchitecture-ecresourcereg/p419dcatservices/blob/SMR-CHORDSwebAPI/ChordsWebAPIv2.jsonld

@ashepherd you might be interested in this discussion as well...

RichardWallis commented 4 years ago

See issue #7 for the context of the move from the main Schema.org issue tracker to this repository.

smrgeoinfo commented 4 years ago

So how to I get this recognized as an issue?