Last active
May 18, 2020 23:49
-
-
Save meowsbits/986d6afdfb5c8ccb9f7afde80f8123cc to your computer and use it in GitHub Desktop.
Example OpenRPC document generated by https://github.com/etclabscore/go-openrpc-reflect.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openrpc": "1.2.4", | |
"info": null, | |
"methods": [ | |
{ | |
"name": "MyCalculator.PlusOne", | |
"description": "```go\nfunc (c *MyCalculator) PlusOne(arg *PlusOneArg, reply *PlusOneReply) error {\n\tif arg == nil {\n\t\treturn errBadUse\n\t}\n\tanswer := *arg + 1\n\tc.history = append(c.history, int(answer))\n\t*reply = (PlusOneReply)(answer)\n\treturn nil\n}// PlusOne is deceivingly simple function that increments any value by 1.\n\n```", | |
"summary": "PlusOne is deceivingly simple function that increments any value by 1.\n", | |
"paramStructure": "by-position", | |
"params": [ | |
{ | |
"name": "arg", | |
"description": "*PlusOneArg", | |
"schema": { | |
"type": "integer" | |
}, | |
"required": true | |
} | |
], | |
"result": { | |
"name": "reply", | |
"description": "*PlusOneReply", | |
"schema": { | |
"type": "integer" | |
}, | |
"required": true | |
}, | |
"externalDocs": { | |
"description": "Github remote link", | |
"url": "https://github.com/etclabscore/go-openrpc-reflect/blob/master/example1_test.go#L36" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment