-
Notifications
You must be signed in to change notification settings - Fork 14
Add Boilerplate Sample Setup #4
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
Add Boilerplate Sample Setup #4
Conversation
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.
Pull Request Overview
This PR introduces a boilerplate sample setup by adding a _TEMPLATE folder and updating API-related code to support tags in API definitions and operations. Key changes include adding tests to verify tag behavior, updating the API and APIOperation constructors in shared/python/apimtypes.py to set defaults for policy XML and tags, and modifying sample and infrastructure notebooks/Bicep files accordingly.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/python/test_apimtypes.py | Adds new unit tests for API tag functionality and updates equality checks to include tags. |
| shared/python/apimtypes.py | Updates API and APIOperation constructors to accept optional tags and to use a default policy XML if none is provided. |
| shared/bicep/modules/apim/v1/api.bicep | Adds resources for creating APIM tags based on the API tags property. |
| samples/** and infrastructure/** | Updates notebooks and Bicep templates to align with the new API model and improve error handling via raise SystemExit. |
| .vscode/* | Adds configuration settings and documentation for improved VS Code support. |
Comments suppressed due to low confidence (2)
shared/python/apimtypes.py:131
- Changing the default behavior of policyXml to load a default XML rather than remaining None may impact APIs that are intentionally created without a policy. Please confirm that this behavior is intentional and update documentation if needed.
self.policyXml = policyXml if policyXml is not None else _read_policy_xml(DEFAULT_XML_POLICY_PATH)
tests/python/test_apimtypes.py:200
- The previously expected TypeError in test_api_missing_fields has been commented out. Please verify that suppressing this exception aligns with the intended API behavior without inadvertently masking issues.
# with pytest.raises(TypeError):
_TEMPLATEfolder with generic sample support as the basis for any new samples.