Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Proposal: Augment dna.json to support clearer auto-generated api documentation #97

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dna/clutter/input-get-follow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "getPost Input Schema",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"from": {
"type": "string"
}
},
"required": ["type", "from"]
}
10 changes: 10 additions & 0 deletions dna/clutter/input-get-post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"title": "getPost Input Schema",
"type": "object",
"properties": {
"postHash": {
"type": "string"
}
},
"required": ["postHash"]
}
7 changes: 7 additions & 0 deletions dna/clutter/input-get-posts-by.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"title": "getPostsBy Input Schema",
"type": "array",
"items": {
"type": "string"
}
}
22 changes: 22 additions & 0 deletions dna/clutter/input-post-mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"title": "Post Schema",
"type": "object",
"properties": {
"post": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"stamp": {
"type": "integer"
}
},
"required": ["message", "stamp"]
},
"hash": {
"type": "string"
}
},
"required": ["post", "hash"]
}
32 changes: 30 additions & 2 deletions dna/dna.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,81 +77,104 @@
{
"Name": "getProperty",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "setFirstName",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getFirstName",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "appProperty",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "follow",
"Description": "Begin following another user by their handle.\n## returns\nThe follow links hash.",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "unfollow",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "post",
"Description": "Post a message with your currently set handle.\n## returns\nThe post entry hash.",
"CallingType": "json",
"InputSchemaFile": "post.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getPost",
"CallingType": "json",
"InputSchemaFile": "input-get-post.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "postMod",
"CallingType": "json",
"InputSchemaFile": "input-post-mod.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getPostsBy",
"CallingType": "json",
"InputSchemaFile": "input-get-posts-by.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getPostsWithHashtag",
"CallingType": "json",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "newHandle",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getHandle",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getAgent",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getFollow",
"CallingType": "json",
"InputSchemaFile": "input-get-follow.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "getHandles",
"CallingType": "json",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
}
]
Expand Down Expand Up @@ -180,16 +203,21 @@
{
"Name": "anchor",
"CallingType": "json",
"InputSchemaFile": "anchor.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "exists",
"CallingType": "json",
"InputSchemaFile": "anchor.json",
"ReturnType": "string",
"Exposure": "public"
},
{
"Name": "anchors",
"CallingType": "string",
"ReturnType": "string",
"Exposure": "public"
}
]
Expand Down
Loading