Skip to content

Conversation

@simonkurtz-MSFT
Copy link
Member

  • Adds a _TEMPLATE folder with generic sample support as the basis for any new samples.

@simonkurtz-MSFT simonkurtz-MSFT requested a review from Copilot May 24, 2025 02:26
@simonkurtz-MSFT simonkurtz-MSFT self-assigned this May 24, 2025
@simonkurtz-MSFT simonkurtz-MSFT added the enhancement New feature or request label May 24, 2025
@github-actions
Copy link

Python 3.12 Test Results

81 tests  +3   81 ✅ +3   1s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit fc766de. ± Comparison against base commit 4313838.

@github-actions
Copy link

Python 3.13 Test Results

81 tests  +3   81 ✅ +3   0s ⏱️ -1s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit fc766de. ± Comparison against base commit 4313838.

Copy link

Copilot AI left a 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):

@simonkurtz-MSFT simonkurtz-MSFT merged commit 40b761c into main May 24, 2025
7 checks passed
@simonkurtz-MSFT simonkurtz-MSFT deleted the feature/add-boilerplate-sample-support branch May 24, 2025 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants