@gyeonghokim/openapi-converter
v1.1.0
Published
Convert API collection files (Postman, Apidog, Bruno) to OpenAPI v3 format
Downloads
185
Maintainers
Readme
openapi-converter
Convert API collection files (Postman, Apidog, Bruno) to OpenAPI v3 format.
Features
- Convert Postman Collections to OpenAPI v3
- Convert Apidog Collections to OpenAPI v3
- Convert Bruno Collections to OpenAPI v3
Installation
npm install -g @gyeonghokim/openapi-converterOr use locally:
npm install --save-dev @gyeonghokim/openapi-converterUsage
openapi-converter <input-file> [options]
# or just
oac <input-file> [options]
Options:
-o, --output <path> Output file path (default: openapi.json, only supports json and yaml formats)
-p, --provider <provider> Provider to use (default: postman, only supports postman, apidog, bruno)
-h, --help Show help messageExamples
# Convert Postman collection
openapi-converter collection.json -o api-spec.json
# Convert Apidog collection
openapi-converter apidog-export.json
# Convert Bruno collection
openapi-converter bruno-collection.json -o openapi.yamlDevelopment
Setup
# Clone the repository
git clone <repository-url>
cd openapi-converter
# Install dependencies
npm installAvailable Scripts
# Build the project
npm run build
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with UI
npm run test:ui
# Run linter
npm run lint
# Format code
npm run format
# Check and fix formatting and linting
npm run check
# Development mode (watch)
npm run devProject Structure
openapi-converter/
├── src/
│ ├── cli.ts # CLI entry point
│ └── index.ts # Main conversion logic
├── test/
│ └── index.test.ts # Tests
├── dist/ # Build output (generated)
├── biome.json # Biome configuration
├── tsconfig.json # TypeScript configuration
├── commitlint.config.js # Commitlint configuration
└── package.json # Project configurationGit Hooks
This project uses Husky for Git hooks:
- pre-commit: Runs lint-staged to check and format staged files
- commit-msg: Validates commit messages against conventional commit format
Commit Message Format
This project follows Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI configuration changeschore: Other changes
License
MIT
