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

Update autorest version for Radius #8042

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions build/generate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,27 @@ generate-genericcliclient: generate-node-installed generate-autorest-installed
.PHONY: generate-rad-corerp-client
generate-rad-corerp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the corerp client SDK (Autorest).
@echo "$(AUTOREST_MODULE_VERSION) is module version"
autorest pkg/corerp/api/README.md --tag=core-2023-10-01-preview
autorest pkg/corerp/api/README.md --tag=core-2023-10-01-preview && rm pkg/corerp/api/v20231001preview/go.mod
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the go.mod that we are removing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're required to set values for module and module version because we set azure-arm: true in autorest configuration. This creates a go.mod file. It looks for existing go.mod in the output directory and creates it since it doesn't already exist. We can remove it post generation of file, in our usecase, since we want the generated output to be part of the existing module at the root of the project.

Copy link
Contributor

Choose a reason for hiding this comment

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

how were we removing it before?


.PHONY: generate-rad-datastoresrp-client
generate-rad-datastoresrp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the datastoresrp client SDK (Autorest).
@echo "$(AUTOREST_MODULE_VERSION) is module version"
autorest pkg/datastoresrp/api/README.md --tag=datastores-2023-10-01-preview
autorest pkg/datastoresrp/api/README.md --tag=datastores-2023-10-01-preview && rm pkg/datastoresrp/api/v20231001preview/go.mod

.PHONY: generate-rad-messagingrp-client
generate-rad-messagingrp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the messagingrp client SDK (Autorest).
@echo "$(AUTOREST_MODULE_VERSION) is module version"
autorest pkg/messagingrp/api/README.md --tag=messaging-2023-10-01-preview
autorest pkg/messagingrp/api/README.md --tag=messaging-2023-10-01-preview && rm pkg/messagingrp/api/v20231001preview/go.mod

.PHONY: generate-rad-daprrp-client
generate-rad-daprrp-client: generate-node-installed generate-autorest-installed generate-tsp-installed generate-openapi-spec ## Generates the daprrp client SDK (Autorest).
@echo "$(AUTOREST_MODULE_VERSION) is module version"
autorest pkg/daprrp/api/README.md --tag=dapr-2023-10-01-preview
autorest pkg/daprrp/api/README.md --tag=dapr-2023-10-01-preview && rm pkg/daprrp/api/v20231001preview/go.mod

.PHONY: generate-rad-ucp-client
generate-rad-ucp-client: generate-node-installed generate-autorest-installed test-ucp-spec-examples ## Generates the UCP client SDK (Autorest).
@echo "$(AUTOREST_MODULE_VERSION) is module version"
autorest pkg/ucp/api/README.md --tag=ucp-2023-10-01-preview
autorest pkg/ucp/api/README.md --tag=ucp-2023-10-01-preview && rm pkg/ucp/api/v20231001preview/go.mod

.PHONY: generate-mockgen-installed
generate-mockgen-installed:
Expand Down
3 changes: 2 additions & 1 deletion pkg/corerp/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ The following configuration generates track2 go models and client.

```yaml $(tag) != ''
version: 3.*.*
use: "@autorest/[email protected]"
use: "@autorest/[email protected]"
module: "github.com/radius-project/radius/pkg/corerp/api/v20231001preview"
Copy link
Contributor

Choose a reason for hiding this comment

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

was module made a required property in the new version?

module-version: 0.0.1
file-prefix: zz_generated_
license-header: "Licensed under the Apache License, Version 2.0 . See LICENSE in the repository root for license information.\nCode generated by Microsoft (R) AutoRest Code Generator.\nChanges may cause incorrect behavior and will be lost if the code is regenerated."
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading