-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add overlay support, a CLI tool and inlining and bundling capabilities #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
📊 Test Coverage ReportCurrent Coverage: Coverage Change: 📉 -1.1% (decreased) Coverage by Package
Generated by GitHub Actions |
29aa142 to
36e7cb0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces significant new capabilities to the OpenAPI library, adding overlay support, a comprehensive CLI tool, and advanced document transformation features including inlining and bundling.
🚀 New Features
📋 OpenAPI Overlay Support
🛠️ Comprehensive CLI Tool
A new installable CLI tool (
openapi) that provides three main command groups:OpenAPI Commands (
openapi openapi)validate- Validate OpenAPI specifications for complianceupgrade- Upgrade OpenAPI specs to the latest supported version (3.1.1)inline- Inline all references to create self-contained documentsbundle- Bundle external references into components section while preserving structureOverlay Commands (
openapi overlay)apply- Apply overlays to modify OpenAPI specificationsvalidate- Validate overlay files for correctnesscompare- Generate overlay specifications by comparing two OpenAPI documentsArazzo Commands (
openapi arazzo)validate- Validate Arazzo workflow documents for compliance🔗 Document Transformation Features
Inlining Capabilities
$refreferences with their actual content$defsfor circular referencesBundling Capabilities
external_api_yaml~UserUser_1,User_2🏗️ Technical Implementation
Core Components Added
overlay/package - Complete overlay specification implementationopenapi/inline.go- Document inlining functionalityopenapi/bundle.go- Document bundling functionalitycmd/openapi/- Main CLI applicationopenapi/cmd/,overlay/cmd/,arazzo/cmd/- Command implementationshashing/package - Content hashing utilities for transformation operationsKey Features
📚 Documentation
🧪 Testing
💡 Use Cases
Bundle vs Inline Decision Guide
Use Bundle when:
Use Inline when:
Overlay Applications
🔄 Migration from openapi-overlay
This implementation migrates and enhances functionality from the standalone
openapi-overlayrepository, providing a unified toolkit for all OpenAPI-related operations.⚡ Installation & Usage
This PR significantly expands the library's capabilities, making it a comprehensive toolkit for working with OpenAPI specifications, overlays, and Arazzo workflows.