-
Notifications
You must be signed in to change notification settings - Fork 24
feat(output format): Add api response in the result for JSON format - create command #87
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
aviatco
merged 21 commits into
microsoft:main
from
aviatco:dev/aviatcohen/setApiResponseInJsonFormat
Dec 24, 2025
Merged
feat(output format): Add api response in the result for JSON format - create command #87
aviatco
merged 21 commits into
microsoft:main
from
aviatco:dev/aviatcohen/setApiResponseInJsonFormat
Dec 24, 2025
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
ayeshurun
reviewed
Dec 9, 2025
ayeshurun
reviewed
Dec 9, 2025
ayeshurun
reviewed
Dec 9, 2025
ayeshurun
reviewed
Dec 9, 2025
Co-authored-by: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com>
ayeshurun
reviewed
Dec 10, 2025
ayeshurun
reviewed
Dec 10, 2025
ayeshurun
reviewed
Dec 10, 2025
ayeshurun
reviewed
Dec 22, 2025
ayeshurun
reviewed
Dec 22, 2025
ayeshurun
previously approved these changes
Dec 22, 2025
Collaborator
ayeshurun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding docstrings for better readability and clarity
…ithub.com/aviatco/fabric-cli into dev/aviatcohen/setApiResponseInJsonFormat
ayeshurun
reviewed
Dec 23, 2025
ayeshurun
previously approved these changes
Dec 23, 2025
Collaborator
ayeshurun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion.
ayeshurun
approved these changes
Dec 24, 2025
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.
📥 Pull Request
✨ Description of new changes
Update create command Output Format and Add Batch output processing
Overview
Enhanced the create command output format to include API response data and implemented batch output for operations that create multiple items in a single command execution.
Key Changes
Updated print_output_format calls: Modified all mkdir command implementations to include API response data in the output
Added show_headers=True: Enabled structured table headers for better readability
Consistent data inclusion: All mkdir operations now return the complete API response alongside success messages
Files Modified:
Batch collection mechanism: Added output_batch tracking system for operations creating multiple items
Consolidated output: Multiple related item creations now produce unified output instead of separate messages
Dependency handling: Automatic dependencies (like EventHouse for KQL Database) are batched together
Key Implementation Details:
Consolidated messaging: Multiple items show as 'item1.Type' and 'item2.Type' created
API response inclusion: Full API response data now included in output for debugging/automation
Table formatting: Structured headers show item properties (id, type, displayName, workspaceId)
JSON/Text format support: Both output formats include the enhanced data structure
Benefits
For Users
Better visibility: Users can see complete API response data including IDs, types, and metadata
Cleaner output: Related operations (like KQL Database + EventHouse) show consolidated results
Structured information: Table headers make it easier to understand response data
For Automation
Rich data access: Scripts can access full API response data for further processing
Consistent format: Standardized output structure across all mkdir operations
Batch awareness: Automated tools can detect when multiple items were created together
Testing
Comprehensive test coverage: Tests verify both single item and batch creation scenarios
Output validation: Tests confirm proper headers, data inclusion, and message formatting
Format compatibility: Both JSON and text output formats tested with new structure
Example Output Changes
Before:
After (Text format):
id type displayName workspaceId
12345678-1234-1234-1234-123456789012 Lakehouse MyLakehouse abcd-efgh-ijkl
Batch Example (KQL Database with auto EventHouse):
id type displayName workspaceId
87654321-4321-4321-4321-876543210987 Eventhouse MyDatabase_auto abcd-efgh-ijkl
12345678-1234-1234-1234-123456789012 KQLDatabase MyDatabase abcd-efgh-ijkl
This enhancement provides richer output information while maintaining backward compatibility and improving the user experience for both interactive use and automation scenarios.