remark-openapi
A remark plugin that converts a link to a local or remote open api spec into a table with summary of all paths.
This project is inspired by remark-swagger. It borrows some code in table generation from remark-swagger.
Installation
$ npm install remark-openapi
Usage
This plugin is to be used with remark, e.g.
var vfile = ;var remark = ;var openapi = ; var example = vfile; ;
This plugin does a conversion when the markdown file contains a link to a local open api spec file
[API Reference](../assets/petstore-open-api.json "openapi:")
or a remote open api spec file
[API Reference](https://temando.github.io/open-api-renderer/petstore-open-api-v3.0.0-RC2.json "openapi:")
The above will be converted to the following table:
# swagger link| Path | Method | Summary || ----- | ------ | -------------------------- || /pet | POST | Add a new pet to the store || /pet | PUT | Update an existing pet || /user | POST | Create user |