https://github.com/badsyntax/gatsby-openapi
A mono-repo with a set a gatsby plugins that can be used to build API docs from an OpenAPI specification.
https://github.com/badsyntax/gatsby-openapi
gatsby openapi
Last synced: 10 months ago
JSON representation
A mono-repo with a set a gatsby plugins that can be used to build API docs from an OpenAPI specification.
- Host: GitHub
- URL: https://github.com/badsyntax/gatsby-openapi
- Owner: badsyntax
- Created: 2020-08-21T16:26:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-30T18:22:18.000Z (over 5 years ago)
- Last Synced: 2025-02-15T05:15:02.420Z (12 months ago)
- Topics: gatsby, openapi
- Language: TypeScript
- Homepage:
- Size: 3.59 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-openapi

A mono-repo with a set a gatsby plugins that can be used to build API docs from an OpenAPI specification.
__NOTE:__ This repo is in the very early stages of development.
## Plugins
- [gatsby-source-openapi](./packages/gatsby-source-openapi): Parse an OpenAPI 3 specification and create the gatsby graphql nodes.
- [gatsby-theme-openapi-core](./packages/gatsby-theme-openapi-core): Creates the theme pages.
- [gatsby-theme-openapi-theme-ui](./packages/gatsby-theme-openapi-theme-ui): Renders the OpenAPI docs using `theme-ui`.
## Examples
- [example-theme-ui](./packages.example-theme-ui): An example site using the [gatsby-theme-openapi-theme-ui]('./packages/gatsby-theme-openapi-theme-ui) theme
## Goals
- Provide a framework for building API docs with full customisation capabilities (not just tweaking theme variables)
- Provide some good default themes
- Provide features to render in a single page, or multiple pages
- Provide a CLI utility to easily bootstrap/scaffold
## Developing
This is a lerna project. Common dependencies are hoisted into the root `node_modules` directory. This means you must re-bootstrap the project (`npm run boostrap`) after installing any dependencies into any of the packages.
### Getting Started
```sh
# install lerna dependencies
npm install
# install & hoist package dependencies (this can take a long time)
npm run bootstrap
# run the example site
npm start
```
### Build the example site
```sh
npm run build
```
### Troubleshooting
`Error sourcing OpenAPI data: security.map(...).flat is not a function`
This usually means you're using an older version of node. Use the version as specified in `.nvmrc` or within `package.json`.
## License
MIT License
Copyright (c) 2020 Richard Willis