Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/http-client-python"
---

Add coverage for Python GeoJSON alternate type responses.
10 changes: 5 additions & 5 deletions packages/http-client-python/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/http-client-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"@azure-tools/typespec-azure-resource-manager": "~0.74.0",
"@azure-tools/typespec-azure-rulesets": "~0.74.0",
"@azure-tools/typespec-client-generator-core": "~0.74.0",
"@azure-tools/azure-http-specs": "0.1.0-alpha.47",
"@azure-tools/azure-http-specs": "0.1.0-alpha.48-dev.3",
"@typespec/compiler": "^1.18.0",
"@typespec/http": "^1.18.0",
"@typespec/openapi": "^1.18.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ async def test_external_type_get_model(client: AlternateTypeClient):
result = await client.external_type.get_model()

# Validate the response structure based on the TypeSpec example
assert isinstance(result, geojson.Feature)
assert result.type == "Feature"
assert result.geometry.type == "Point"
assert result.geometry.coordinates == [-122.25, 37.87]
Expand All @@ -56,6 +57,7 @@ async def test_external_type_get_property(client: AlternateTypeClient):
result = await client.external_type.get_property()

# Validate the response structure based on the TypeSpec example
assert isinstance(result.feature, geojson.Feature)
assert result.feature.type == "Feature"
assert result.feature.geometry.type == "Point"
assert result.feature.geometry.coordinates == [-122.25, 37.87]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_external_type_get_model(client: AlternateTypeClient):
result = client.external_type.get_model()

# Validate the response structure based on the TypeSpec example
assert isinstance(result, geojson.Feature)
assert result.type == "Feature"
assert result.geometry.type == "Point"
assert result.geometry.coordinates == [-122.25, 37.87]
Expand All @@ -52,6 +53,7 @@ def test_external_type_get_property(client: AlternateTypeClient):
result = client.external_type.get_property()

# Validate the response structure based on the TypeSpec example
assert isinstance(result.feature, geojson.Feature)
assert result.feature.type == "Feature"
assert result.feature.geometry.type == "Point"
assert result.feature.geometry.coordinates == [-122.25, 37.87]
Expand Down