Skip to content

Releases: dreamquality/swagger-coverage-cli

Release v8.0.2

11 Oct 21:04

Choose a tag to compare

🚀 swagger-coverage-cli v8.0.2

✨ New Features

  • 📁 Folder-Level Tests Support: Tests defined at folder level in Postman collections are now automatically applied to all requests within that folder
  • 🔄 Recursive Test Inheritance: Support for nested folder hierarchies with test inheritance across multiple levels
  • 🛡️ Flexible Spec Validation: New --disable-spec-validation flag to process specs with validation or reference issues

🎨 Enhanced Features

  • Better Coverage Calculation: More accurate coverage metrics by including folder-level test assertions
  • Reduced Test Duplication: Define common tests once at folder level instead of repeating on every request
  • Enterprise Collection Support: Improved support for well-organized Postman collections with folder structures
  • Legacy API Support: Work with incomplete or invalid specs using --disable-spec-validation

📁 Folder-Level Tests

Postman collections organized into folders can now have tests defined at the folder level that automatically apply to all child requests:

{
  "name": "User API",
  "item": [
    { "name": "Get Users", "request": {...} },
    { "name": "Create User", "request": {...} }
  ],
  "event": [{
    "listen": "test",
    "script": {
      "exec": ["pm.expect(pm.response.code).to.be.oneOf([200, 201]);"]
    }
  }]
}

Benefits:

  • ✅ Both requests inherit status codes 200 and 201 from folder
  • ✅ Folder tests combine with request-level tests
  • ✅ Supports unlimited nesting depth
  • ✅ Backward compatible with existing collections

🛡️ Spec Validation Control

The new --disable-spec-validation flag allows you to analyze coverage even when specs have validation issues:

# Skip validation for specs with broken references or validation errors
swagger-coverage-cli api.yaml collection.json --disable-spec-validation

Use cases:

  • Legacy APIs with incomplete specifications
  • Specs with external references that can't be resolved
  • APIs in development where specs aren't fully complete
  • Quick coverage checks without fixing all spec issues first

🎯 Protocol Support

📋 REST/OpenAPI

  • OpenAPI v2/v3 specifications (YAML/JSON)
  • Smart path matching with parameter variations
  • Request body and query parameter validation
  • Multiple status codes per operation

⚡ gRPC

  • Protocol Buffer (.proto) file parsing
  • Service and method extraction
  • HTTP/2 path mapping (/package.service/method)
  • Content-type validation (application/grpc)

🔀 GraphQL

  • GraphQL schema (.graphql/.gql) parsing
  • Query, mutation, and subscription extraction
  • Type system with arguments and unions
  • Unified /graphql endpoint handling

🚀 Usage Examples

# Single protocol APIs
swagger-coverage-cli api.yaml collection.json           # OpenAPI/REST
swagger-coverage-cli service.proto collection.json     # gRPC
swagger-coverage-cli schema.graphql collection.json    # GraphQL

# Mixed protocol APIs (Enterprise-ready)
swagger-coverage-cli "api.yaml,service.proto,schema.graphql" collection.json

# All existing options work across protocols
swagger-coverage-cli "api.yaml,service.proto" collection.json --verbose --strict-body

🔧 Compatibility

  • ✅ Maintains backwards compatibility with existing workflows
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally
  • ✅ Smart mapping enabled by default
  • ✅ All existing CLI options work with new protocols

📦 Installation

npm install -g swagger-coverage-cli@8.0.2

🧪 Quality Assurance

  • 198 Tests: Comprehensive test suite covering all protocols, scenarios, folder-level tests, and spec validation control
  • 22 Test Suites: Dedicated test coverage for each protocol, integration scenarios, validation features, and edge cases
  • Folder Tests Coverage: 18 tests specifically for folder-level test extraction including deep nesting, empty folders, and mixed patterns
  • Edge Case Coverage: Robust handling of malformed URLs, missing data, broken references, complex scenarios, and various Postman collection structures
  • Performance Tested: Validated with large datasets, mixed protocol specifications, and deeply nested folder hierarchies
  • Protocol Isolation: Each protocol's parsing and matching logic is independently tested
  • Validation Testing: Comprehensive tests for --disable-spec-validation flag covering unit and CLI integration

Full Changelog: v1.0.0...v8.0.2

Release v8.0.1

09 Oct 09:03

Choose a tag to compare

🚀 swagger-coverage-cli v8.0.1

✨ New Features

  • 🛡️ Flexible Spec Validation: New --disable-spec-validation flag to process specs with validation or reference issues

🎨 Enhanced Features

  • Legacy API Support: Work with incomplete or invalid specs using --disable-spec-validation

🛡️ Spec Validation Control

The new --disable-spec-validation flag allows you to analyze coverage even when specs have validation issues:

# Skip validation for specs with broken references or validation errors
swagger-coverage-cli api.yaml collection.json --disable-spec-validation

Use cases:

  • Legacy APIs with incomplete specifications
  • Specs with external references that can't be resolved
  • APIs in development where specs aren't fully complete
  • Quick coverage checks without fixing all spec issues first

🎯 Protocol Support

📋 REST/OpenAPI

  • OpenAPI v2/v3 specifications (YAML/JSON)
  • Smart path matching with parameter variations
  • Request body and query parameter validation
  • Multiple status codes per operation

⚡ gRPC

  • Protocol Buffer (.proto) file parsing
  • Service and method extraction
  • HTTP/2 path mapping (/package.service/method)
  • Content-type validation (application/grpc)

🔀 GraphQL

  • GraphQL schema (.graphql/.gql) parsing
  • Query, mutation, and subscription extraction
  • Type system with arguments and unions
  • Unified /graphql endpoint handling

🚀 Usage Examples

# Single protocol APIs
swagger-coverage-cli api.yaml collection.json           # OpenAPI/REST
swagger-coverage-cli service.proto collection.json     # gRPC
swagger-coverage-cli schema.graphql collection.json    # GraphQL

# Mixed protocol APIs (Enterprise-ready)
swagger-coverage-cli "api.yaml,service.proto,schema.graphql" collection.json

# All existing options work across protocols
swagger-coverage-cli "api.yaml,service.proto" collection.json --verbose --strict-body

🔧 Compatibility

  • ✅ Maintains backwards compatibility with existing workflows
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally
  • ✅ Smart mapping enabled by default
  • ✅ All existing CLI options work with new protocols

📦 Installation

npm install -g swagger-coverage-cli@8.0.1

🧪 Quality Assurance

  • 183 Tests: Comprehensive test suite covering all protocols and scenarios including spec validation control
  • 22 Test Suites: Dedicated test coverage for each protocol, integration scenarios, and validation features
  • Edge Case Coverage: Robust handling of malformed URLs, missing data, broken references, and complex scenarios
  • Performance Tested: Validated with large datasets and mixed protocol specifications
  • Protocol Isolation: Each protocol's parsing and matching logic is independently tested
  • Validation Testing: 16 new tests for --disable-spec-validation flag covering unit and CLI integration

Full Changelog: v1.0.0...v8.0.1

Release v8.0.0

19 Sep 14:14

Choose a tag to compare

🚀 swagger-coverage-cli v8.0.0

✨ New Features

  • 🌐 Multi-Protocol Support: Native support for REST (OpenAPI/Swagger), gRPC (Protocol Buffers), and GraphQL schemas
  • 🔄 Mixed API Analysis: Process multiple API specifications with different protocols in a single run
  • 🎯 Protocol-Aware Matching: Intelligent request matching tailored to each API protocol's characteristics
  • 📊 Unified Reporting: Generate consolidated HTML reports with protocol-specific insights and color coding
  • ⚡ Universal CLI: Single interface works across all supported protocols with consistent syntax

🎨 Enhanced Features

  • Smart Endpoint Mapping: Intelligent endpoint matching with status code prioritization enabled by default
  • Enhanced Path Matching: Improved handling of path parameters with different naming conventions
  • Confidence Scoring: Match quality assessment with 0.0-1.0 confidence scores
  • Status Code Intelligence: Prioritizes successful (2xx) codes over error codes for better coverage
  • Multi-API Support: Process multiple API specifications in a single run
  • Enhanced HTML Reports: Interactive reports with protocol identification and color coding

🎯 Protocol Support

📋 REST/OpenAPI

  • OpenAPI v2/v3 specifications (YAML/JSON)
  • Smart path matching with parameter variations
  • Request body and query parameter validation
  • Multiple status codes per operation

⚡ gRPC

  • Protocol Buffer (.proto) file parsing
  • Service and method extraction
  • HTTP/2 path mapping (/package.service/method)
  • Content-type validation (application/grpc)

🔀 GraphQL

  • GraphQL schema (.graphql/.gql) parsing
  • Query, mutation, and subscription extraction
  • Type system with arguments and unions
  • Unified /graphql endpoint handling

🚀 Usage Examples

# Single protocol APIs
swagger-coverage-cli api.yaml collection.json           # OpenAPI/REST
swagger-coverage-cli service.proto collection.json     # gRPC
swagger-coverage-cli schema.graphql collection.json    # GraphQL

# Mixed protocol APIs (Enterprise-ready)
swagger-coverage-cli "api.yaml,service.proto,schema.graphql" collection.json

# All existing options work across protocols
swagger-coverage-cli "api.yaml,service.proto" collection.json --verbose --strict-body

🔧 Compatibility

  • ✅ Maintains backwards compatibility with existing workflows
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally
  • ✅ Smart mapping enabled by default
  • ✅ All existing CLI options work with new protocols

📦 Installation

npm install -g swagger-coverage-cli@8.0.0

🧪 Quality Assurance

  • 147 Tests: Comprehensive test suite covering all protocols and scenarios
  • 19 Test Suites: Dedicated test coverage for each protocol and integration scenarios
  • Edge Case Coverage: Robust handling of malformed URLs, missing data, and complex scenarios
  • Performance Tested: Validated with large datasets and mixed protocol specifications
  • Protocol Isolation: Each protocol's parsing and matching logic is independently tested

Full Changelog: v1.0.0...v8.0.0

Release v7.0.0

18 Sep 12:27

Choose a tag to compare

🚀 swagger-coverage-cli v7.0.0

✨ Features

  • Smart Endpoint Mapping: Intelligent endpoint matching with status code prioritization enabled by default
  • Enhanced Path Matching: Improved handling of path parameters with different naming conventions
  • Confidence Scoring: Match quality assessment with 0.0-1.0 confidence scores
  • Status Code Intelligence: Prioritizes successful (2xx) codes over error codes for better coverage
  • Multi-API Support: Process multiple Swagger/OpenAPI specifications in a single run
  • Unified Reporting: Generate combined coverage reports with individual API metrics
  • Format Support: YAML, JSON, and CSV file formats supported
  • Enhanced HTML Reports: Clean, accessible reports with confidence indicators

🚀 Smart Mapping Benefits

  • Improved Coverage Accuracy: Smart mapping significantly improves coverage detection
  • Status Code Prioritization: Prioritizes 2xx → 4xx → 5xx for better matching
  • Path Intelligence: Handles parameter variations like /users/{id} vs /users/{userId}
  • Confidence Assessment: Shows match quality to help identify reliable matches
  • Default Behavior: No flags required - smart mapping works automatically

🔧 Compatibility

  • ✅ Maintains backwards compatibility with existing workflows
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally
  • ✅ Smart mapping enabled by default

📦 Installation

npm install -g swagger-coverage-cli@7.0.0

🎯 Usage Examples

# Smart mapping enabled by default
swagger-coverage-cli api-spec.yaml collection.json

# With verbose output to see smart mapping statistics
swagger-coverage-cli api-spec.yaml collection.json --verbose

# Multiple APIs with smart mapping
swagger-coverage-cli api1.yaml,api2.yaml,api3.json collection.json

# Works with Newman reports too
swagger-coverage-cli api-spec.yaml newman-report.json --newman

🧪 Quality Assurance

  • 130 Tests: Comprehensive test suite covering all smart mapping scenarios
  • 38 Smart Mapping Tests: Dedicated tests for status code priority, path matching, confidence scoring
  • Edge Case Coverage: Robust handling of malformed URLs, missing data, and complex scenarios
  • Performance Tested: Validated with large datasets (1000+ operations)

Full Changelog: v1.0.0...v7.0.0

Release v5.0.0

15 Sep 17:00

Choose a tag to compare

🚀 swagger-coverage-cli v5.0.0

✨ Features

  • Multi-API Support: Process multiple Swagger/OpenAPI specifications in a single run
  • Unified Reporting: Generate combined coverage reports with individual API metrics
  • API Identification: Tagged operations show source API name for better tracking
  • Enhanced HTML Reports: New API column and multi-API headers for visual clarity
  • Format Support: YAML, JSON, and CSV file formats supported
  • Microservices Ready: Perfect for microservices architecture with multiple APIs

🔧 Compatibility

  • ✅ Maintains backwards compatibility with single API mode
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally

📦 Installation

npm install -g swagger-coverage-cli@5.0.0

🎯 Usage Examples

# Single API (backwards compatible)
swagger-coverage-cli -s swagger.yaml -c collection.json

# Multiple APIs
swagger-coverage-cli -s users-api.yaml,products-api.json,orders-api.csv -c collection.json

# Generate detailed HTML report
swagger-coverage-cli -s api1.yaml,api2.yaml -c tests.json -o detailed-report.html

📊 What's New in Multi-API Reports

  • API Source Column: Each operation shows which API it belongs to
  • Combined Statistics: Overall coverage across all APIs
  • Individual Breakdowns: Per-API coverage metrics
  • Visual Enhancements: Better headers and organization

Full Changelog: v1.0.0...v5.0.0

Release v4.0.0

15 Sep 12:37

Choose a tag to compare

🚀 swagger-coverage-cli v4.0.0

✨ Features

  • Multi-API Support: Process multiple Swagger/OpenAPI specifications in a single run
  • Unified Reporting: Generate combined coverage reports with individual API metrics
  • API Identification: Tagged operations show source API name for better tracking
  • Enhanced HTML Reports: New API column and multi-API headers for visual clarity
  • Format Support: YAML, JSON, and CSV file formats supported
  • Microservices Ready: Perfect for microservices architecture with multiple APIs

🔧 Compatibility

  • ✅ Maintains backwards compatibility with single API mode
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally

📦 Installation

npm install -g swagger-coverage-cli@4.0.0

🎯 Usage Examples

# Single API (backwards compatible)
swagger-coverage-cli -s swagger.yaml -c collection.json

# Multiple APIs
swagger-coverage-cli -s users-api.yaml,products-api.json,orders-api.csv -c collection.json

# Generate detailed HTML report
swagger-coverage-cli -s api1.yaml,api2.yaml -c tests.json -o detailed-report.html

📊 What's New in Multi-API Reports

  • API Source Column: Each operation shows which API it belongs to
  • Combined Statistics: Overall coverage across all APIs
  • Individual Breakdowns: Per-API coverage metrics
  • Visual Enhancements: Better headers and organization

Full Changelog: v1.0.0...v4.0.0

Release v3.0.0

15 Sep 12:36

Choose a tag to compare

🚀 swagger-coverage-cli v3.0.0

✨ Features

  • Multi-API Support: Process multiple Swagger/OpenAPI specifications in a single run
  • Unified Reporting: Generate combined coverage reports with individual API metrics
  • API Identification: Tagged operations show source API name for better tracking
  • Enhanced HTML Reports: New API column and multi-API headers for visual clarity
  • Format Support: YAML, JSON, and CSV file formats supported
  • Microservices Ready: Perfect for microservices architecture with multiple APIs

🔧 Compatibility

  • ✅ Maintains backwards compatibility with single API mode
  • ✅ Node.js 14+ required
  • ✅ NPM package available globally

📦 Installation

npm install -g swagger-coverage-cli@3.0.0

🎯 Usage Examples

# Single API (backwards compatible)
swagger-coverage-cli -s swagger.yaml -c collection.json

# Multiple APIs
swagger-coverage-cli -s users-api.yaml,products-api.json,orders-api.csv -c collection.json

# Generate detailed HTML report
swagger-coverage-cli -s api1.yaml,api2.yaml -c tests.json -o detailed-report.html

📊 What's New in Multi-API Reports

  • API Source Column: Each operation shows which API it belongs to
  • Combined Statistics: Overall coverage across all APIs
  • Individual Breakdowns: Per-API coverage metrics
  • Visual Enhancements: Better headers and organization

Full Changelog: v1.0.0...v3.0.0