Skip to content

Commit

Permalink
Security - Updating API versions of alerts and pricing types (#5269)
Browse files Browse the repository at this point in the history
* Security - Updating api versions of alerts and pricing types

* fix codegen paths for Go SDK
  • Loading branch information
chlahav authored and jhendrixMSFT committed Feb 28, 2019
1 parent bb075aa commit 3fee785
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 18 deletions.
Expand Up @@ -189,7 +189,7 @@
]
}
},
"FreeTrialRemainingTime": {
"freeTrialRemainingTime": {
"type": "string",
"format": "duration",
"readOnly": true,
Expand Down
34 changes: 34 additions & 0 deletions specification/security/resource-manager/readme.csharp.md
@@ -0,0 +1,34 @@
## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

## Common C# settings

``` yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
clear-output-folder: true
```

``` yaml $(csharp) && !$(multiapi) && !$(profile)
namespace: Microsoft.Azure.Management.Security
output-folder: $(csharp-sdks-folder)/SecurityCenter/Management.SecurityCenter/Generated
```

## Batch settings
These settings are for batch mode only: (ie, add `--multiapi` to the command line )

``` yaml $(multiapi)
namespace: Microsoft.Azure.Management.Security.$(ApiVersionName)
output-folder: $(csharp-sdks-folder)/$(ApiVersionName)/Generated

batch:
- tag: package-composite-v1
ApiVersionName: package_composite_v1

- tag: package-composite-v2
ApiVersionName: package_composite_v2
```
14 changes: 12 additions & 2 deletions specification/security/resource-manager/readme.go.md
Expand Up @@ -9,11 +9,12 @@ go:
clear-output-folder: true
```

### Go multi-api
### Common Go settings

```yaml $(go) && $(multiapi)
batch:
- tag: package-composite-v1
- tag: package-composite-v2
```

### Tag: package-composite-v1 and go
Expand All @@ -22,5 +23,14 @@ These settings apply only when `--tag=package-composite-v1 --go` is specified on
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

```yaml $(tag) == 'package-composite-v1' && $(go)
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2017-08-01-preview/$(namespace)
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/v1.0/$(namespace)
```

### Tag: package-composite-v2 and go

These settings apply only when `--tag=package-composite-v2 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

```yaml $(tag) == 'package-composite-v2' && $(go)
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/v2.0/$(namespace)
```
50 changes: 36 additions & 14 deletions specification/security/resource-manager/readme.md
Expand Up @@ -38,7 +38,7 @@ These are the global settings for the Security API.
title: SecurityCenter
description: API spec for Microsoft.Security (Azure Security Center) resource provider
openapi-type: arm
tag: package-composite-v1
tag: package-composite-v2
```

## Composite packages
Expand Down Expand Up @@ -74,6 +74,35 @@ override-info:
title: SecurityCenter
```

### Tag: package-composite-v2

These settings apply only when `--tag=package-composite-v2` is specified on the command line.

```yaml $(tag) == 'package-composite-v2'
input-file:
- Microsoft.Security/stable/2018-06-01/pricings.json
- Microsoft.Security/preview/2017-08-01-preview/securityContacts.json
- Microsoft.Security/preview/2017-08-01-preview/workspaceSettings.json
- Microsoft.Security/preview/2017-08-01-preview/autoProvisioningSettings.json
- Microsoft.Security/preview/2017-08-01-preview/compliances.json
- Microsoft.Security/preview/2017-08-01-preview/advancedThreatProtectionSettings.json
- Microsoft.Security/preview/2017-08-01-preview/settings.json
- Microsoft.Security/preview/2017-08-01-preview/informationProtectionPolicies.json
- Microsoft.Security/preview/2015-06-01-preview/operations.json
- Microsoft.Security/preview/2015-06-01-preview/locations.json
- Microsoft.Security/preview/2015-06-01-preview/tasks.json
- Microsoft.Security/stable/2019-01-01/alerts.json
- Microsoft.Security/preview/2015-06-01-preview/discoveredSecuritySolutions.json
- Microsoft.Security/preview/2015-06-01-preview/jitNetworkAccessPolicies.json
- Microsoft.Security/preview/2015-06-01-preview/externalSecuritySolutions.json
- Microsoft.Security/preview/2015-06-01-preview/topologies.json
- Microsoft.Security/preview/2015-06-01-preview/allowedConnections.json

# Needed when there is more than one input file
override-info:
title: SecurityCenter
```

---

# Code Generation
Expand All @@ -93,18 +122,7 @@ swagger-to-sdk:

## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

```yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Microsoft.Azure.Management.Security
payload-flattening-threshold: 2
output-folder: $(csharp-sdks-folder)/SecurityCenter/Management.SecurityCenter/Generated
clear-output-folder: true
```
See configuration in [readme.csharp.md](./readme.csharp.md)

## Go

Expand All @@ -120,4 +138,8 @@ See configuration in [readme.nodejs.md](./readme.nodejs.md)

## TypeScript

See configuration in [readme.typescript.md](./readme.typescript.md)
See configuration in [readme.typescript.md](./readme.typescript.md)

## Ruby

See configuration in [readme.ruby.md](./readme.ruby.md)
36 changes: 35 additions & 1 deletion specification/security/resource-manager/readme.python.md
Expand Up @@ -12,16 +12,50 @@ python:
payload-flattening-threshold: 2
namespace: azure.mgmt.security
package-name: azure-mgmt-security
package-version: 0.1.0
package-version: 1.0.0
clear-output-folder: true
```

``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/azure-mgmt-security/azure/mgmt/security
```

``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/azure-mgmt-security
```

### Python multi-api

Generate all API versions currently shipped for this package

```yaml $(python) && $(multiapi)
batch:
- tag: package-composite-v1
- tag: package-composite-v2
```

### Tag: package-composite-v1-only and python

These settings apply only when `--tag=package-composite-v1-only --python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.

``` yaml $(tag) == 'package-composite-v1-only' && $(python)
python:
namespace: azure.mgmt.security.composite-v1
output-folder: $(python-sdks-folder)/azure-mgmt-security/azure/mgmt/security/composite-v1
```

### Tag: package-composite-v2-only and python

These settings apply only when `--tag=package-composite-v2-only --python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.

``` yaml $(tag) == 'package-composite-v2-only' && $(python)
python:
namespace: azure.mgmt.security.composite-v2
output-folder: $(python-sdks-folder)/azure-mgmt-security/azure/mgmt/security/composite-v2
```
38 changes: 38 additions & 0 deletions specification/security/resource-manager/readme.ruby.md
@@ -0,0 +1,38 @@
## Ruby

These settings apply only when `--ruby` is specified on the command line.
Please also specify `--node-sdks-folder=<path to root folder of your azure-sdk-for-node clone>`.

``` yaml
package-name: azure_mgmt_security
package-version: "1.0.0"
azure-arm: true
```

### Ruby multi-api

``` yaml $(ruby) && $(multiapi)
batch:
- tag: package-composite-v1
- tag: package-composite-v2
```

### Tag: package-composite-v1 and ruby

These settings apply only when `--tag=package-composite-v1 --ruby` is specified on the command line.
Please also specify `--ruby-sdks-folder=<path to the root directory of your azure-sdk-for-ruby clone>`.

``` yaml $(tag) == 'package-composite-v1' && $(ruby)
namespace: "Azure::Security::Mgmt::package_composite_v1"
output-folder: $(ruby-sdks-folder)/management/azure_mgmt_security/lib
```

### Tag: package-composite-v2 and ruby

These settings apply only when `--tag=package-composite-v2 --ruby` is specified on the command line.
Please also specify `--ruby-sdks-folder=<path to the root directory of your azure-sdk-for-ruby clone>`.

``` yaml $(tag) == 'package-composite-v2' && $(ruby)
namespace: "Azure::Security::Mgmt::package_composite_v2"
output-folder: $(ruby-sdks-folder)/management/azure_mgmt_security/lib
```

0 comments on commit 3fee785

Please sign in to comment.