This repository was moved: https://www.npmjs.com/package/@scalar/cli
Command-line interface to work with OpenAPI files
- Format & validate OpenAPI files
- Upload your OpenAPI files to Scalar
- Get a fully mocked API for testing purposes
- Preview your API reference
- Bundle multiple OpenAPI files
npx @scalar/cli helpnpm install -g @scalar/cli scalar --versionscalar init scalar format openapi.json scalar validate openapi.json scalar bundle openapi.json --output bundle.json scalar reference openapi.json --watch scalar mock openapi.json --watch scalar share openapi.jsonTo validate your OpenAPI file in GitHub Actions, add this workflow:
# .github/workflows/validate-openapi-file.yml name: Validate OpenAPI File on: push: branches: - main pull_request: branches: - main jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 with: node-version: 20 - name: Validate OpenAPI File # Replace `./my-openapi-file.json` with the correct path and filename for your project. # Or: run `npx @scalar/cli init` and add the config file to your repository. run: npx @scalar/cli validate ./my-openapi-file.jsonWe are API nerds. You too? Let’s chat on Discord: https://discord.gg/8HeZcRGPFS
| hanspagel | hwkr |
Contributions are welcome! Read CONTRIBUTING.
The source code in this repository is licensed under MIT.
