AI-Planning / planning-as-a-service

The newly improved planner (and more) in the cloud.
Apache License 2.0
30 stars 8 forks source link

Ambiguous `result` element #38

Open jan-dolejsi opened 2 years ago

jan-dolejsi commented 2 years ago

It is hard and untidy to consume the result element, because in context of status: PENDING it is a string/URL, and in context of status: ok, it is a structure. I recommend putting the URL to a distinctly different element outside of the result field.

Here is my understanding, of what the returned json body semantic: https://github.com/jan-dolejsi/pddl-planning-service-client/blob/main/src/PlannerPackagePreviewService.ts#L125

Consider this:

{
  "status": "PENDING",
  "check": "/check/......."
}

... vs ...

{
  "status": "ok",
  "result": {
   }
}
haz commented 2 years ago

Will discuss this mainly in #34