ausdigital / ausdigital.github.io

This repository maintains content for the AusDigital homepage
http://ausdigital.org
3 stars 6 forks source link

add examples to the API specs #40

Closed onthebreeze closed 7 years ago

onthebreeze commented 7 years ago

API docs like http://ausdigital.org/specs/ausdigital-dcp/1.0/api are nice but seem to be missing important information about the request/response body.

Need to add examples - something like https://jexhson.github.io/jekyll-swagger/example-1.html

kshychko commented 7 years ago

@webilhan , could you please adjust the layout for a box with an example? digital capability publisher dcp interface specification ausdigital standards by ausdigital 2

webilhan commented 7 years ago

@kshychko Layout adjusted please check.

kshychko commented 7 years ago

@webilhan , thanks! Looks OK now!

kshychko commented 7 years ago

@webilhan , please add a render of example property which is located in the request parameter. So if the request parameter has "example" property, render its value. For responses it is a text, but for requests it is JSON object, although should be treated as a text.

Example below:

"keyDetailPost": {
      "properties": {
        "pubKey": {
          "type": "string"
        },
        "revoked": {
          "type": "string",
          "format": "date-time"
        },
        "fingerprint": {
          "type": "string"
        }
      },
      "example": {
        "published": "2017-04-11T13:58:37.058Z",
        "keyid": "string",
        "pubKey": "string",
        "revoked": "2017-04-11T13:58:37.058Z",
        "fingerprint": "string"
      }
    }
webilhan commented 7 years ago

@kshychko Render of example property in the request parameter has been added.

kshychko commented 7 years ago

thanks! works well! Could you please also check why tags are not shown for the three of five methods in DCL spec - http://ausdigital.org/specs/ausdigital-dcl/1.0/api#

webilhan commented 7 years ago

@kshychko Tags showing fixed.

kshychko commented 7 years ago

verified as fixed, thanks!

kshychko commented 7 years ago

tags are now being duplicated: http://ausdigital.org/specs/ausdigital-dcp/1.0/api

webilhan commented 7 years ago

@kshychko Fixed.

kshychko commented 7 years ago

verified as fixed