candy-api icon indicating copy to clipboard operation
candy-api copied to clipboard

Open api/0.12 spec

Open alecritson opened this issue 4 years ago • 3 comments
trafficstars

This PR has various updates to the spec to get ready for 0.12

Notably I've added some initial include descriptions for resources, update some examples and update query params for some important routes.

alecritson avatar Mar 22 '21 13:03 alecritson

Also worth noting we do not have any spec for the recycle bin restore function.

glennjacobs avatar Mar 23 '21 20:03 glennjacobs

Channels

GET /channels

{
  "data": [
    {
      "id": "y3g6v91o",
      "name": "Webstore",
      "handle": "webstore",
      "url": "localhost:8080",
      "default": true
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 24,
    "last_page": 15,
    "path": "string",
    "per_page": 1,
    "to": 0,
    "total": 0,
    "links": [
      {
        "url": "string",
        "label": "string",
        "active": true
      }
    ]
  }
}

Need to replace the "string" entries with something meaningful.

POST + PUT /channels

Missing example request.

GET /channels/{channelId}

Example request in PHP not JSON.

glennjacobs avatar Mar 26 '21 13:03 glennjacobs

{
  "data": [
    {
      "id": "y3g6v91o",
      "name": "Webstore",
      "handle": "webstore",
      "url": "localhost:8080",
      "default": true
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 24,
    "last_page": 15,
    "path": "http:\\/\\/api.test\\/api\\/v1\\/channels",
    "per_page": 1,
    "to": 0,
    "total": 0,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "active": false
      },
      {
        "url": "http://api.test/api/v1/channels?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next »",
        "active": false
      }
    ]
  }
}

URLs are showing in two different formats?

glennjacobs avatar Mar 26 '21 13:03 glennjacobs