-
Notifications
You must be signed in to change notification settings - Fork 16
Remove the JSON-RPC from the example's code in the documentation #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,11 +68,8 @@ | |
| ] | ||
| }, | ||
| { | ||
| "name": "testMarkdownDescription", | ||
| "summary": "A method that pulls it's description from an external markdown file.", | ||
| "description": { | ||
| "$ref": "file:../descriptions/modules/Simple/methodWithMarkdownDescription.md" | ||
| }, | ||
| "name": "testMethodWithoutParams", | ||
| "summary": "A method.", | ||
| "tags": [ | ||
| { | ||
| "name": "capabilities", | ||
|
|
@@ -81,16 +78,8 @@ | |
| ] | ||
| } | ||
| ], | ||
| "params": [ | ||
| { | ||
| "name": "parameter", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "boolean" | ||
| }, | ||
| "summary": "A test parameter." | ||
| } | ||
| ], | ||
| "description": "Validates basic method generation with a single boolean parameter and a simple object result.", | ||
| "params": [], | ||
| "result": { | ||
| "name": "result", | ||
| "summary": "A result for testing basic method generation.", | ||
|
|
@@ -112,6 +101,50 @@ | |
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "name": "Default Example", | ||
| "params": [], | ||
| "result": { | ||
| "name": "Default Result", | ||
| "value": { | ||
| "foo": "here's foo" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "testMarkdownDescription", | ||
| "summary": "A method that pulls it's description from an external markdown file.", | ||
vladimir-rangelov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "description": { | ||
|
Comment on lines
+119
to
+120
|
||
| "$ref": "file:../descriptions/modules/Simple/methodWithMarkdownDescription.md" | ||
| }, | ||
| "tags": [ | ||
| { | ||
| "name": "capabilities", | ||
| "x-uses": [ | ||
| "xrn:firebolt:capability:test:test" | ||
| ] | ||
| } | ||
| ], | ||
| "params": [ | ||
| { | ||
| "name": "parameter", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "boolean" | ||
| }, | ||
| "summary": "A test parameter." | ||
| } | ||
| ], | ||
| "result": { | ||
| "name": "result", | ||
| "summary": "A result string.", | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "name": "Default Example", | ||
|
|
@@ -123,9 +156,7 @@ | |
| ], | ||
| "result": { | ||
| "name": "Default Result", | ||
| "value": { | ||
| "foo": "here's foo" | ||
| } | ||
| "value": "here's the result" | ||
| } | ||
| } | ||
| ] | ||
|
|
@@ -213,7 +244,7 @@ | |
| "name": "result", | ||
| "summary": "A result for testing basic method generation.", | ||
| "schema": { | ||
| "type": "null" | ||
| "type": "integer" | ||
| } | ||
| }, | ||
| "examples": [ | ||
|
|
@@ -227,7 +258,7 @@ | |
| ], | ||
| "result": { | ||
| "name": "Default Result", | ||
| "value": null | ||
| "value": 123 | ||
| } | ||
| } | ||
| ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1961,6 +1961,12 @@ function insertExampleMacros(template, examples, method, json, templates, appApi | |
| let first = true | ||
| let languages = '' | ||
| Object.entries(example.languages).forEach(([name, language]) => { | ||
|
|
||
| //In the generated documentation, the example code for JSON-RPC is deprecated, so we omit it. | ||
|
||
| if (name.toLowerCase() === 'json-rpc') { | ||
| return; | ||
| } | ||
|
|
||
|
Comment on lines
1963
to
+1969
|
||
| let languageContent = language.template //getTemplateForExample(method, templates) | ||
| // wrap example in collapsible HTML if not first | ||
| if (!first) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.