Skip to content

Commit 312544c

Browse files
authored
[Security] Add directive definition to csharp to avoid .Net conflicts (#21206)
* [Security] Add directive definition to csharp to avoid .net conflicts * Add declaration * Fix * Add second renaming * Fix Applications.json enum values * Rename x-ms-parameter-location value for not breaking the .net sdk * fix types path * asclocation path
1 parent aafb094 commit 312544c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

specification/security/resource-manager/Microsoft.Security/preview/2022-07-01-preview/applications.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@
485485
"type": "string",
486486
"description": "The application Condition's Operator, for example Contains for id or In for list of possible IDs, see examples",
487487
"enum": [
488+
"Contains",
488489
"Equals",
489490
"In"
490491
],
@@ -496,6 +497,10 @@
496497
"value": "Contains",
497498
"description": "Checks that the string value of the data defined in Property contains the given value"
498499
},
500+
{
501+
"value": "Equals",
502+
"description": "Checks that the string value of the data defined in Property equals the given value"
503+
},
499504
{
500505
"value": "In",
501506
"description": "Checks that the string value of the data defined in Property equals any of the given values (exact fit)"

specification/security/resource-manager/readme.csharp.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ csharp:
1111
license-header: MICROSOFT_MIT_NO_VERSION
1212
payload-flattening-threshold: 2
1313
clear-output-folder: true
14+
15+
directive:
16+
- from: securityContacts.json
17+
where: $.definitions.SecurityContactProperties.properties.alertNotifications.properties.state
18+
transform: >
19+
$['x-ms-enum']['name'] = 'SecurityAlertNotificationState';
20+
- from: securityContacts.json
21+
where: $.definitions.SecurityContactProperties.properties.notificationsByRole.properties.state
22+
transform: >
23+
$['x-ms-enum']['name'] = 'SecurityAlertNotificationByRoleState';
24+
- from: swagger-document
25+
where: $.parameters.AscLocation
26+
transform: >
27+
$['x-ms-parameter-location'] = 'client';
1428
```
1529
1630
``` yaml $(csharp) && !$(multiapi) && !$(profile)

0 commit comments

Comments
 (0)