Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unknown Enum #8976

Merged
merged 1 commit into from
Apr 8, 2020
Merged
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
19 changes: 19 additions & 0 deletions specification/compute/resource-manager/readme.csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@ csharp:
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 1
clear-output-folder: true

# remove DUMMY member of enum
directive:
# dynamically add a DummyOrchestrationServiceName value to the enum
- from: compute.json
where: $..enum
transform: >-
if( $.length === 1 && $[0] === "AutomaticRepairs") {
$.push('DummyOrchestrationServiceName');
}
return $;

# remove it from the C# generated code
- from: source-file-csharp
where: $
transform: >-
return $.
replace(/.*public const string DummyOrchestrationServiceName.*/g,'').
replace(/, 'DummyOrchestrationServiceName'/g,'');
```

``` yaml $(csharp) && !$(multiapi) && !$(csharp-profile)
Expand Down
19 changes: 19 additions & 0 deletions specification/compute/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ These settings apply only when `--go` is specified on the command line.
go:
license-header: MICROSOFT_APACHE_NO_VERSION
clear-output-folder: true

directive:
# dynamically add a DummyOrchestrationServiceName value to the enum
- from: compute.json
where: $..enum
transform: >-
if( $.length === 1 && $[0] === "AutomaticRepairs") {
$.push('DummyOrchestrationServiceName');
}
return $;

- from: source-file-go
where: $
transform: >-
return $.
replace(/\/\/ DummyOrchestrationServiceName .../g,'').
replace(/DummyOrchestrationServiceName OrchestrationServiceNames = "DummyOrchestrationServiceName"\n/g,'').
replace(/,DummyOrchestrationServiceName/,'').
replace(/, 'DummyOrchestrationServiceName'/,'');
```

### Go multi-api
Expand Down
16 changes: 16 additions & 0 deletions specification/compute/resource-manager/readme.nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,20 @@ nodejs:
generate-license-txt: true
generate-package-json: true
generate-readme-md: false

directive:
# dynamically add a DummyOrchestrationServiceName value to the enum
- from: compute.json
where: $..enum
transform: >-
if( $.length === 1 && $[0] === "AutomaticRepairs") {
$.push('DummyOrchestrationServiceName');
}
return $;

- from: source-file-nodejs
where: $
transform: >-
return $.
replace(/[,*] 'DummyOrchestrationServiceName'/g,'');
```
17 changes: 17 additions & 0 deletions specification/compute/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ python:
package-name: azure-mgmt-compute
no-namespace-folders: true
clear-output-folder: true

directive:
# dynamically add a DummyOrchestrationServiceName value to the enum
- from: compute.json
where: $..enum
transform: >-
if( $.length === 1 && $[0] === "AutomaticRepairs") {
$.push('DummyOrchestrationServiceName');
}
return $;

- from: source-file-python
where: $
transform: >-
return $.
replace(/, 'DummyOrchestrationServiceName'/g,'').
replace(/dummy_orchestration_service_name = "DummyOrchestrationServiceName"/g,'');
```

### Python multi-api
Expand Down
28 changes: 28 additions & 0 deletions specification/compute/resource-manager/readme.ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,30 @@ These settings apply only when `--ruby` is specified on the command line.
package-name: azure_mgmt_compute
package-version: "0.17.1"
azure-arm: true

directive:
# dynamically add a DummyOrchestrationServiceName value to the enum
- from: compute.json
where: $..enum
transform: >-
if( $.length === 1 && $[0] === "AutomaticRepairs") {
$.push('DummyOrchestrationServiceName');
}
return $;

- from: source-file-ruby
where: $
transform: >-
return $.
replace(/, 'DummyOrchestrationServiceName'/g,'').
replace(/DummyOrchestrationServiceName = "DummyOrchestrationServiceName"/g,'');
```

### Ruby multi-api

``` yaml $(ruby) && $(multiapi)
batch:
- tag: package-compute-2019-12
- tag: package-disks-2018-04
- tag: package-compute-only-2017-12
- tag: package-skus-2017-09
Expand All @@ -21,6 +39,16 @@ batch:
- tag: package-compute-2015-06
```

### Tag: package-compute-2019-12 and ruby

These settings apply only when `--tag=package-compute-2019-12 --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-compute-2019-12' && $(ruby)
namespace: "Azure::Compute::Mgmt::V2019_12_01"
output-folder: $(ruby-sdks-folder)/management/azure_mgmt_compute/lib
```

### Tag: package-disks-2018-04 and ruby

These settings apply only when `--tag=package-disks-2018-04 --ruby` is specified on the command line.
Expand Down
16 changes: 16 additions & 0 deletions specification/compute/resource-manager/readme.typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ Please also specify `--typescript-sdks-folder=<path to root folder of your azure
typescript:
azure-arm: true
generate-metadata: true

directive:
# dynamically add a DummyOrchestrationServiceName value to the enum
- from: compute.json
where: $..enum
transform: >-
if( $.length === 1 && $[0] === "AutomaticRepairs") {
$.push('DummyOrchestrationServiceName');
}
return $;

- from: source-file-typescript
where: $
transform: >-
return $.
replace(/[,|*] 'DummyOrchestrationServiceName'/g,'');
```

``` yaml $(typescript) && !$(profile)
Expand Down