Skip to content
Merged
Changes from 3 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
20 changes: 10 additions & 10 deletions specification/compute/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

These settings apply only when `--go` is specified on the command line.

```yaml $(go) && !(track2)
```yaml $(go) && !$(track2)
go:
license-header: MICROSOFT_MIT_NO_VERSION
clear-output-folder: true
Expand All @@ -16,15 +16,6 @@ directive:
$.push('DummyOrchestrationServiceName');
}
return $;

- from: source-file-go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't need this any more for track 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need this anymore. Once the enum entry was added into the modeler, the generator can handle it properly. We do not need replace the generated code anymore.

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

``` yaml $(go) && $(track2)
Expand All @@ -35,6 +26,15 @@ output-folder: $(go-sdk-folder)/$(module-name)
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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this dummy value is required?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I do not know. Maybe we should confirm this with the service team. Let me send some emails to ask

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added in #8976 if that helps.

}
return $;

- from: disk.json
where: "$.definitions.PurchasePlan"
transform: >
Expand Down