npoint
npoint copied to clipboard
Add a describedby Link header
Interesting product! With a few enhancements I can use it to rapid prototype JSON Hyper-Schema APIs that I can easily share with others.
The most important thing would be to add describedby Links to document GETs.
GET https://api.npoint.io/my-super-cool-resource HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
Link: </my-super-cool-resource/schema>; rel="describedby"
{
"data": "foo"
}
The describedby Link indicates that the JSON in the response conforms to the schema retrievable at that location given.
http://json-schema.org/latest/json-schema-core.html#rfc.section.10.1
Just seeing this issue now.
Great suggestion, I will definitely add this! I wasn't aware of the describedBy header, but was trying to think of how I could make the schema more accessible via API. This is perfect.