๐Ÿ“ฆ Kong / spec-editor

Live editor experience for Kong Spec Renderer

โ˜… 5 stars โ‘‚ 1 forks ๐Ÿ‘ 5 watching
๐Ÿ“ฅ Clone https://github.com/Kong/spec-editor.git
HTTPS git clone https://github.com/Kong/spec-editor.git
SSH git clone git@github.com:Kong/spec-editor.git
CLI gh repo clone Kong/spec-editor
renovate[bot] renovate[bot] chore(deps): update dependency @stylistic/stylelint-plugin to v5 (#187) 612c824 19 hours ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ public
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ .npmrc
๐Ÿ“„ .stylelintrc.mjs
๐Ÿ“„ env.d.ts
๐Ÿ“„ eslint.config.mjs
๐Ÿ“„ index.html
๐Ÿ“„ lefthook.yaml
๐Ÿ“„ package.json
๐Ÿ“„ pnpm-lock.yaml
๐Ÿ“„ README.md
๐Ÿ“„ renovate.json
๐Ÿ“„ tsconfig.json
๐Ÿ“„ vite.config.ts
๐Ÿ“„ vitest.config.ts
๐Ÿ“„ README.md

API documentation editor - Kong

A playground with live editor for Kong's spec renderer. Supports:

  • JSON and YAML file formats
  • OpenAPI 2.0, 3.0 and 3.1 (including callbacks)
  • AsyncAPI

Project Setup

pnpm install

Compile and Hot-Reload for Development

pnpm dev

Type-Check

pnpm typecheck

Lint and fix

Lint package files, and optionally auto-fix detected issues.

# Stylelint only
pnpm run stylelint

# Stylelint and fix
pnpm run stylelint:fix

# ESLint only
pnpm run lint

# ESLint and fix
pnpm run lint:fix

Build for production


pnpm run build

Committing Changes

Commitizen friendly

This repo uses Conventional Commits.

Commitizen and Commitlint are used to help build and enforce commit messages.

It is highly recommended to use the following command in order to create your commits:

pnpm run commit

This will trigger the Commitizen interactive prompt for building your commit message.

Enforcing Commit Format

Lefthook is used to manage Git Hooks within the repo.

  • A commit-msg hook is automatically setup that enforces commit message stands with commitlint, see lefthook.ymal
  • A pre-push hook is used that runs eslint before allowing you to push your changes to the repository
Additionally, CI will use commitlint to validate the commits associated with a PR in the Lint and Validate job.