devhammed / insomnia-plugin-documenter

Export Insomnia workspace HTML documentation.

Home Page:https://insomnia.rest/plugins/insomnia-plugin-documenter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example Response Not Parsed From Description Field

RobertKlohr opened this issue · comments

The CLI tool this plugin is based is supposed to be able to parse and create Example responses if they are in the request description and are wrapped in between and . When I try this the example I put in the description is displayed in the description field in the HTML output and not on the right side as an example response.

Here is a sample of a description field on a response.

Outputs report data to a CSV, PDF, or XLSX file format. The My Reports tab in the user interface contains the ID for the desired report. If a report is not found or permissions are not granted to export data, the message "Report does not exist or is inaccessible" appears.

* Permissions: The authentication account must have General Access - Read and Print/Export permissions to:
    * Applicable component
    * Applicable records
    * Applicable fields in the component (table)

<!-- RESPONSE -->
{
"Id": 2,
"Name": "Anonymous Incident Analysts",
"Description": "",
"BusinessUnit": false,
"SecurityRoles": [],
"Users": [
{
"Id": 6,
"FullName": "Admin, Lockpath"
},
{
"Id": 27,
"FullName": "User, Test"
}
],
"ChildGroups": [],
"ParentGroups": []
}
<!-- ENDRESPONSE -->

After reading through several other posts I found I figure out the problem and will update the solution here and close the issue. My confusion stemmed from the demo video posted with the CLI tool. It seems that the way example responses are formatted so they can be parsed changed in the program but the video was never updated.

The correct formatting to use is to wrap the example response in a markdown code block with "response" set as the code block language. Using my example description text above corrected so that it works correctly. You can optionally add a colon and the response code to the "response" language tag.


Outputs report data to a CSV, PDF, or XLSX file format. The My Reports tab in the user interface contains the ID for the desired report. If a report is not found or permissions are not granted to export data, the message "Report does not exist or is inaccessible" appears.

* Permissions: The authentication account must have General Access - Read and Print/Export permissions to:
    * Applicable component
    * Applicable records
    * Applicable fields in the component (table)

```response:200
{
"Id": 2,
"Name": "Anonymous Incident Analysts",
"Description": "",
"BusinessUnit": false,
"SecurityRoles": [],
"Users": [
{
"Id": 6,
"FullName": "Admin, Lockpath"
},
{
"Id": 27,
"FullName": "User, Test"
}
],
"ChildGroups": [],
"ParentGroups": []
}
```

Yeah, I should be able to update the example ASAP.