Skip to content

Lightning API docs #715

@mtuchi

Description

@mtuchi

Continue from #673
Next steps

  • We need to add support for Open API Spec on lightning. use this library https://github.com/open-api-spex/open_api_spex
  • After adding that library create a demo spec eg project_controller_spec.ex to show the structure
  • generate openapi.yaml file and put it in a directory that can be fetch via http request, eg static/openapi.yaml
  • In docs repo use "docusaurus-plugin-openapi-docs": "^4.5.1", "docusaurus-theme-openapi-docs": "^4.5.1", to generate docs. In docusaurus.config.ts We can specify
 plugins: [
    [
      'docusaurus-plugin-openapi-docs',
      {
        id: 'api',
        docsPluginId: 'classic',
        config: {
          lightning: {
            specPath: 'static/openapi.yaml',
            outputDir: 'docs/api',
            sidebarOptions: {
              groupPathsBy: 'tag',
              categoryLinkSource: 'tag',
            },
          },
        },
      },
    ],
  ],
  • It's definitely easier to generating the docs on lightning, So i will have to figure out how to fetch the openapi.yaml form lightning repo. Probably should look on adaptor generate script

Resources

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions