Skip to content

Commit 2b4433c

Browse files
author
Milan Zolota
committed
Removing raw format & returning references only
1 parent f2f6784 commit 2b4433c

File tree

6 files changed

+26
-119
lines changed

6 files changed

+26
-119
lines changed

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimanagement.json

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -548,33 +548,6 @@
548548
"default": "xml",
549549
"x-ms-parameter-location": "method"
550550
},
551-
"PolicyFragmentExportFormat": {
552-
"name": "format",
553-
"in": "query",
554-
"required": false,
555-
"type": "string",
556-
"description": "Policy Fragment Export Format.",
557-
"enum": [
558-
"xml",
559-
"rawxml"
560-
],
561-
"x-ms-enum": {
562-
"name": "PolicyFragmentExportFormat",
563-
"modelAsString": true,
564-
"values": [
565-
{
566-
"value": "xml",
567-
"description": "The contents are inline and Content type is an XML document."
568-
},
569-
{
570-
"value": "rawxml",
571-
"description": "The contents are inline and Content type is a non XML encoded policy fragment document."
572-
}
573-
]
574-
},
575-
"default": "xml",
576-
"x-ms-parameter-location": "method"
577-
},
578551
"PolicyFragmentIdParameter": {
579552
"name": "policyFragmentId",
580553
"in": "path",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimpolicyfragments.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@
132132
"x-ms-examples": {
133133
"ApiManagementGetPolicyFragment": {
134134
"$ref": "./examples/ApiManagementGetPolicyFragment.json"
135-
},
136-
"ApiManagementGetPolicyFragmentFormat": {
137-
"$ref": "./examples/ApiManagementGetPolicyFragmentFormat.json"
138135
}
139136
},
140137
"parameters": [
@@ -147,9 +144,6 @@
147144
{
148145
"$ref": "./apimanagement.json#/parameters/PolicyFragmentIdParameter"
149146
},
150-
{
151-
"$ref": "./apimanagement.json#/parameters/PolicyFragmentExportFormat"
152-
},
153147
{
154148
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
155149
},
@@ -304,7 +298,7 @@
304298
"PolicyFragment"
305299
],
306300
"operationId": "PolicyFragment_GetReferences",
307-
"description": "Lists policy documents that reference the policy fragment of the Api Management service.",
301+
"description": "Listsresources that reference the policy fragment of the Api Management service.",
308302
"x-ms-examples": {
309303
"ApiManagementListPolicyFragmentReferences": {
310304
"$ref": "./examples/ApiManagementListPolicyFragmentReferences.json"
@@ -329,9 +323,9 @@
329323
],
330324
"responses": {
331325
"200": {
332-
"description": "Returns an array of Policy Documents that reference the policy fragment.",
326+
"description": "Returns an array of references to resources that include the policy fragment in their definitions.",
333327
"schema": {
334-
"$ref": "./definitions.json#/definitions/PolicyCollection"
328+
"$ref": "./definitions.json#/definitions/PolicyFragmentReferencesCollection"
335329
}
336330
},
337331
"default": {

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/definitions.json

Lines changed: 21 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3913,7 +3913,11 @@
39133913
"value": {
39143914
"type": "array",
39153915
"items": {
3916-
"$ref": "#/definitions/PolicyFragmentContract"
3916+
"allOf": [
3917+
{
3918+
"$ref": "./apimanagement.json#/definitions/Resource"
3919+
}
3920+
]
39173921
},
39183922
"description": "Policy Fragment Contract value."
39193923
},
@@ -3929,65 +3933,30 @@
39293933
},
39303934
"description": "The response of the get policy fragments operation."
39313935
},
3932-
"PolicyFragmentContract": {
3933-
"properties": {
3934-
"properties": {
3935-
"x-ms-client-flatten": true,
3936-
"$ref": "#/definitions/PolicyFragmentContractProperties",
3937-
"description": "Properties of the Policy Fragment."
3938-
}
3939-
},
3940-
"allOf": [
3941-
{
3942-
"$ref": "./apimanagement.json#/definitions/Resource"
3943-
}
3944-
],
3945-
"description": "Policy Fragment Contract details."
3946-
},
3947-
"PolicyFragmentContractProperties": {
3936+
"PolicyFragmentReferencesCollection": {
39483937
"properties": {
39493938
"value": {
3950-
"type": "string",
3951-
"description": "Contents of the Policy Fragment as defined by the format."
3952-
},
3953-
"format": {
3954-
"type": "string",
3955-
"description": "Format of the policyFragmentContent.",
3956-
"enum": [
3957-
"xml",
3958-
"xml-link",
3959-
"rawxml",
3960-
"rawxml-link"
3961-
],
3962-
"x-ms-enum": {
3963-
"name": "PolicyFragmentContentFormat",
3964-
"modelAsString": true,
3965-
"values": [
3966-
{
3967-
"value": "xml",
3968-
"description": "The contents are inline and Content type is an XML document."
3969-
},
3970-
{
3971-
"value": "xml-link",
3972-
"description": "The policy fragment XML document is hosted on a http endpoint accessible from the API Management service."
3973-
},
3974-
{
3975-
"value": "rawxml",
3976-
"description": "The contents are inline and Content type is a non XML encoded policy document."
3977-
},
3939+
"type": "array",
3940+
"items": {
3941+
"allOf": [
39783942
{
3979-
"value": "rawxml-link",
3980-
"description": "The policy fragment document is not XML encoded and is hosted on a http endpoint accessible from the API Management service."
3943+
"$ref": "./apimanagement.json#/definitions/Resource"
39813944
}
39823945
]
39833946
},
3984-
"default": "xml"
3947+
"description": "Policy Fragment References Contract value."
3948+
},
3949+
"count": {
3950+
"type": "integer",
3951+
"format": "int64",
3952+
"description": "Total record count number."
3953+
},
3954+
"nextLink": {
3955+
"type": "string",
3956+
"description": "Next page link if any."
39853957
}
39863958
},
3987-
"required": [
3988-
"value"
3989-
],
3990-
"description": "Policy fragment contract Properties."
3959+
"description": "The response of the get policy fragment references operation."
39913960
},
39923961
"PortalDelegationSettings": {
39933962
"properties": {

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementListPolicyFragmentReferences.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
{
1414
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy",
1515
"type": "Microsoft.ApiManagement/service/policies",
16-
"name": "policy",
17-
"properties": {
18-
"value": "<!--\r\n IMPORTANT:\r\n - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n - Only the <forward-request> policy element can appear within the <backend> section element.\r\n - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n - To remove a policy, delete the corresponding policy statement from the policy document.\r\n - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
19-
}
16+
"name": "policy"
2017
}
2118
],
2219
"count": 1,

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementListPolicyFragments.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
{
1313
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyFragments/policyFragment1",
1414
"type": "Microsoft.ApiManagement/service/policyFragments",
15-
"name": "policyFragment1",
16-
"properties": {
17-
"value": "<json-to-xml apply=\"always\" consider-accept-header=\"false\" />\r\n<rewrite-uri template=\"/resource\" />"
18-
}
15+
"name": "policyFragment1"
1916
}
2017
],
2118
"count": 1,

0 commit comments

Comments
 (0)