ossinsight icon indicating copy to clipboard operation
ossinsight copied to clipboard

Generate API documents according to query configuration

Open Mini256 opened this issue 3 years ago • 7 comments

Generate API documents according to the Query definition file to display on the website.

  • [x] Add initial docs template: https://ossinsight.io/docs/
  • [x] Add a parameter like public: boolean to control whether the query is provided for external use as an exposed API (#834)
  • [x] Add description fields to the query definition to add text description for API (#834)
  • [ ] Write a script to generate MDX document
  • [x] Support defines API as legacy (Better to have) (#855)
  • [x] Support multiple-level query definition file (Better to have) (#861)

Mini256 avatar Sep 13 '22 10:09 Mini256

Next, open collections api

sykp241095 avatar Sep 16 '22 04:09 sykp241095

Could use OpenAPI as internal document:

params.json -> OpenAPI.json -> swagger ui

634750802 avatar Sep 20 '22 03:09 634750802

How about docusaurus-plugin-openapi - Docusaurus OpenAPI, this requires docusaurus-v2: (we are currently using v2-beta.14)

https://www.npmjs.com/package/docusaurus-plugin-openapi

in fact, there actually are some exciting features like “breadcrumb navigation”: image

sykp241095 avatar Sep 27 '22 07:09 sykp241095

it sounds nice

Mini256 avatar Sep 27 '22 08:09 Mini256

image

sykp241095 avatar Sep 27 '22 08:09 sykp241095

We could preview docs at https://redocly.github.io/redoc/?url=https://api.ossinsight.io/openapi.yaml

634750802 avatar Sep 28 '22 08:09 634750802

@Mini256 Now docusaurus is v2.0, how about trying https://github.com/cloud-annotations/docusaurus-openapi

sykp241095 avatar Oct 27 '22 03:10 sykp241095