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

[azquery] update doc comments #20755

Merged
merged 3 commits into from
May 8, 2023
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
9 changes: 2 additions & 7 deletions sdk/monitor/azquery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Release History

## 1.1.0-beta.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
## 1.1.0 (2023-05-09)
gracewilcox marked this conversation as resolved.
Show resolved Hide resolved

### Other Changes
* Updated doc comments

## 1.1.0-beta.1 (2023-04-11)

Expand Down
64 changes: 2 additions & 62 deletions sdk/monitor/azquery/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clear-output-folder: false
export-clients: true
go: true
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/605407bc0c1a133018285f550d01175469cb3c3a/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/stable/2022-10-27/OperationalInsights.json
- https://github.com/Azure/azure-rest-api-specs/blob/72427ef3ff5875bd8409ef112ef5e6f3cf2b8795/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/stable/2022-10-27/OperationalInsights.json
- https://github.com/Azure/azure-rest-api-specs/blob/dba6ed1f03bda88ac6884c0a883246446cc72495/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json
- https://github.com/Azure/azure-rest-api-specs/blob/dba6ed1f03bda88ac6884c0a883246446cc72495/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json
- https://github.com/Azure/azure-rest-api-specs/blob/dba6ed1f03bda88ac6884c0a883246446cc72495/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json
Expand Down Expand Up @@ -152,48 +152,10 @@ directive:
transform: $["name"] = "BatchQueryRequestMethod"

# add descriptions for models and constants that don't have them
- from: swagger-document
where: $.definitions.batchQueryRequest.properties.path
transform: $["description"] = "The query path of a single request in a batch, defaults to /query"
- from: swagger-document
where: $.definitions.batchQueryRequest.properties.method
transform: $["description"] = "The method of a single request in a batch, defaults to POST"
- from: swagger-document
where: $.definitions.batchQueryResponse
transform: $["description"] = "Contains the batch query response and the headers, id, and status of the request"
- from: constants.go
where: $
transform: return $.replace(/type ResultType string/, "//ResultType - Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.\ntype ResultType string");

# update doc comments
- from: swagger-document
where: $.paths["/workspaces/{workspaceId}/query"].post
transform: $["description"] = "Executes an Analytics query for data."
- from: swagger-document
where: $.paths["/$batch"].post
transform: $["description"] = "Executes a batch of Analytics queries for data."
- from: swagger-document
where: $.definitions.queryResults.properties.tables
transform: $["description"] = "The results of the query in tabular format."
- from: swagger-document
where: $.definitions.batchQueryResults.properties.tables
transform: $["description"] = "The results of the query in tabular format."
- from: swagger-document
where: $.definitions.queryBody.properties.workspaces
transform: $["description"] = "A list of workspaces to query in addition to the primary workspace."
- from: swagger-document
where: $.definitions.batchQueryRequest.properties.headers
transform: $["description"] = "Optional. Headers of the request. Can use prefer header to set server timeout, query statistics and visualization information. For more information, see https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/monitor/azquery#readme-increase-wait-time-include-statistics-include-render-visualization"
- from: swagger-document
where: $.definitions.batchQueryRequest.properties.workspace
transform: $["description"] = "Primary Workspace ID of the query"
- from: swagger-document
where: $.definitions.batchQueryRequest.properties.id
transform: $["description"] = "Unique ID corresponding to each request in the batch"
- from: swagger-document
where: $.parameters.workspaceId
transform: $["description"] = "Primary Workspace ID of the query. This is Workspace ID from the Properties blade in the Azure portal"

# delete unused error models
- from: models.go
where: $
Expand Down Expand Up @@ -222,29 +184,7 @@ directive:
# change Table.Rows from type [][]interface{} to type []Row
- from: models.go
where: $
transform: return $.replace(/Rows \[\]\[\]any/, "Rows []Row");

# change render and statistics type to []byte
- from: models.go
where: $
transform: return $.replace(/Statistics any/g, "Statistics []byte");
- from: models.go
where: $
transform: return $.replace(/Visualization any/g, "Visualization []byte");
- from: models_serde.go
where: $
transform: return
$.replace(/err(.*)r\.Statistics\)/, "r.Statistics = val")
- from: models_serde.go
where: $
transform: return $.replace(/err(.*)r\.Visualization\)/, "r.Visualization = val");
- from: models_serde.go
where: $
transform: return
$.replace(/err(.*)b\.Statistics\)/, "b.Statistics = val")
- from: models_serde.go
where: $
transform: return $.replace(/err(.*)b\.Visualization\)/, "b.Visualization = val");
transform: return $.replace(/Rows \[\]\[\]byte/, "Rows []Row");

# change type of timespan from *string to *TimeInterval
- from: models.go
Expand Down
2 changes: 1 addition & 1 deletion sdk/monitor/azquery/build.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build go1.18
// +build go1.18

//go:generate autorest ./autorest.md
//go:generate autorest ./autorest.md --rawjson-as-bytes
//go:generate gofmt -w .

// Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
10 changes: 6 additions & 4 deletions sdk/monitor/azquery/logs_client.go

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

8 changes: 3 additions & 5 deletions sdk/monitor/azquery/models.go

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

8 changes: 4 additions & 4 deletions sdk/monitor/azquery/models_serde.go

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

2 changes: 1 addition & 1 deletion sdk/monitor/azquery/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package azquery

const (
moduleName = "azquery"
version = "v1.1.0-beta.2"
version = "v1.1.0"
gracewilcox marked this conversation as resolved.
Show resolved Hide resolved
)