Skip to content

Commit df18a48

Browse files
authored
Merge pull request #57 from release-engineering/pinschema
Azure: Pin ProductSubmission schema
2 parents 9035b10 + 956d629 commit df18a48

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

cloudpub/models/ms_azure.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,19 @@ class ProductSubmission(AzureProductLinkedResource):
10731073
`Schema definition for ProductSubmission <https://schema.mp.microsoft.com/schema/submission/2022-03-01-preview2>`_
10741074
""" # noqa E501
10751075

1076+
schema: str = field(
1077+
validator=instance_of(str),
1078+
metadata={
1079+
"alias": MS_SCHEMA,
1080+
"const": "https://schema.mp.microsoft.com/schema/submission/2022-03-01-preview2", # noqa E501
1081+
},
1082+
)
1083+
"""
1084+
The `resource schema`_ for Graph API.
1085+
1086+
.. _resource schema: https://learn.microsoft.com/en-us/azure/marketplace/product-ingestion-api#resource-api-reference
1087+
""" # noqa E501
1088+
10761089
target: PublishTarget = field(
10771090
converter=PublishTarget.from_json, on_setattr=NO_OP # type: ignore
10781091
)

tests/ms_azure/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def publish_target() -> Dict[str, str]:
403403
@pytest.fixture
404404
def submission(publish_target: Dict[str, str]) -> Dict[str, Any]:
405405
return {
406-
"$schema": "https://product-ingestion.azureedge.net/schema/submission/2022-03-01-preview2",
406+
"$schema": "https://schema.mp.microsoft.com/schema/submission/2022-03-01-preview2",
407407
"id": "submission/ffffffff-ffff-ffff-ffff-ffffffffffff/0",
408408
"product": "product/ffffffff-ffff-ffff-ffff-ffffffffffff",
409409
"target": publish_target,

0 commit comments

Comments
 (0)