Fix data-plane spec discovery and code generation - #571
Merged
Merged
Conversation
Copilot-Session: 8ff08403-1329-4957-adee-2d621def98f5
Jian Hui (huiii99)
marked this pull request as ready for review
September 11, 2026 06:05
Ethan Yang (necusjz)
approved these changes
Sep 14, 2026
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
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.
Problem
Data-plane resource provider discovery relied on directory names containing a dot. After upstream specifications renamed Microsoft.* directories, valid providers were no longer discovered, while some example/version directories were incorrectly treated as providers.
Code generation also rejected error models containing a literal property named
additionalProperties, blocking services such as monitor/OperationalInsights.Related workflows exposed duplicate TypeSpec entries, incorrect submodule paths and resource-version API arguments, and unreliable AAZ loader detection. Skipping providers without a default tag could also produce an incomplete CLI profile and remove existing commands during generation.
Changes
additionalPropertieserror property consistently in Python and TypeScript, preserving the existing format checks.load_command_tableand its local helpers. Support standard and args-guided loaders, including import aliases, without treating comments or unused imports/helpers as registered commands.Validation
Testing Guide
Assume the required repositories are already cloned and the Python virtual environment is activated. Run the following from this PR's
aaz-dev-toolscheckout.Setup and start
Install the local Python code and build the frontend/emitter assets:
Start the service using your local repository paths:
UI checks
Open http://127.0.0.1:5000.
Data plane → monitor → OperationalInsights. Select API versionv1and add all four resources. Command models should generate without the unsupported error-schema error. If client configuration is required, use endpointhttps://api.loganalytics.ioand AAD scopehttps://api.loganalytics.io/.default.Control plane → monitor → Microsoft.Insights. Verify the resource list and generate anactionGroupsresource using2024-10-01-preview. Provider/resource lists should match the base commit when using the same specs revision.monitorornetworkCLI module for this smoke test.Automated checks
Run in another terminal using the same virtual environment, from the PR checkout:
These cover generation safeguards, management/data-plane submodule paths, patch idempotence, and error-format handling. The emitter must be built before testing because the tests consume
distfiles.After testing, inspect the repository diffs. Only the intended AAZ models and new test-extension files should have changed; existing CLI modules should remain untouched.