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

[Tables] Adding swagger.md #15016

Merged
merged 18 commits into from
Jul 14, 2021
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
41 changes: 41 additions & 0 deletions sdk/tables/autorest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Go

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

<!-- Original autorest command used by Chris Scott -->
<!-- autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztables --module=aztables --openapi-type="data-plane" --credential-scope=none -->

``` yaml
go: true
version: "^3.0.0"
input-file: https://github.com/Azure/azure-rest-api-specs/blob/d744b6bcb95ab4034832ded556dbbe58f4287c5b/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json
license-header: MICROSOFT_MIT_NO_VERSION
clear-output-folder: false
output-folder: aztable
file-prefix: "zz_generated_"
# namespace: aztable
tag: package-2019-02
credential-scope: none
use: "@autorest/go@4.0.0-preview.23"
openapi-type: data-plane
```
<!-- This change will have to be made by hand for now, leaving this directive in case it is useful later -->
<!--
``` yaml
directive:
# dynamically change TableEntityProperties from map[string]interface{} to []byte
- from: swagger-document
where: $.definitions.TableEntityProperties
transform: >-
$["type"] = "string";
$["format"] = "byte";
delete $.additionalProperties;
``` -->
### Go multi-api
``` yaml $(go) && $(multiapi)
batch:
- tag: package-2019-02
```
3 changes: 2 additions & 1 deletion sdk/tables/aztable/table_service_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *T
if isCosmosEndpoint(serviceURL) {
conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}}
}
con := newConnection(serviceURL, cred, conOptions)
conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{"none"}}}))
con := newConnection(serviceURL, conOptions)
c, _ := cred.(*SharedKeyCredential)
return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: *c}, nil
}
Expand Down
6 changes: 1 addition & 5 deletions sdk/tables/aztable/zz_generated_connection.go

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

2 changes: 2 additions & 0 deletions sdk/tables/aztable/zz_generated_constants.go

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

12 changes: 3 additions & 9 deletions sdk/tables/aztable/zz_generated_models.go

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