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

[AutoPR @azure/arm-cosmosdb] Add mongo v7 to the cosmosdb swagger #10812

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 7 additions & 0 deletions sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 16.1.0 (2024-07-25)

**Features**

- Enum KnownServerVersion has a new value Seven0


## 16.0.0 (2024-06-24)

### Features Added
Expand Down
8 changes: 4 additions & 4 deletions sdk/cosmosdb/arm-cosmosdb/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "768c1f32bbfdcea80bdadf92dc2fba2c114c2dda",
"commit": "347b99490a5e689e95303fbdf982f1d5bbabd359",
"readme": "specification/cosmos-db/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\readme.md --use=@autorest/[email protected].23 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected].11",
"use": "@autorest/[email protected].23"
"release_tool": "@azure-tools/[email protected].10",
"use": "@autorest/typescript@^6.0.12"
}
18 changes: 5 additions & 13 deletions sdk/cosmosdb/arm-cosmosdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for CosmosDBManagementClient.",
"version": "16.0.0",
"version": "16.1.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/abort-controller": "^2.1.2",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.6.0",
Expand All @@ -35,7 +35,7 @@
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure/identity": "^4.2.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.1.0",
"mocha": "^10.0.0",
Expand Down Expand Up @@ -106,13 +106,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb"
}
1 change: 1 addition & 0 deletions sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,7 @@ export enum KnownServerVersion {
Five0 = "5.0",
Four0 = "4.0",
Four2 = "4.2",
Seven0 = "7.0",
Six0 = "6.0",
Three2 = "3.2",
Three6 = "3.6"
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {
credential: credentials,
};

const packageDetails = `azsdk-js-arm-cosmosdb/16.0.0`;
const packageDetails = `azsdk-js-arm-cosmosdb/16.1.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -180,7 +180,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2024-05-15";
this.apiVersion = options.apiVersion || "2024-08-15";
this.databaseAccounts = new DatabaseAccountsImpl(this);
this.operations = new OperationsImpl(this);
this.database = new DatabaseImpl(this);
Expand Down
13 changes: 8 additions & 5 deletions sdk/cosmosdb/arm-cosmosdb/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export interface Resource {
}

export interface ApiProperties {
/** Describes the ServerVersion of an a MongoDB account. */
/** Describes the version of the MongoDB account. */
serverVersion?: ServerVersion;
}

Expand Down Expand Up @@ -376,7 +376,7 @@ export interface DatabaseAccountUpdateParameters {
enablePartitionMerge?: boolean;
/** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */
minimalTlsVersion?: MinimalTlsVersion;
/** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */
/** Flag to indicate enabling/disabling of Burst Capacity feature on the account */
enableBurstCapacity?: boolean;
/** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */
customerManagedKeyStatus?: string;
Expand Down Expand Up @@ -2766,7 +2766,7 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties {
enablePartitionMerge?: boolean;
/** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */
minimalTlsVersion?: MinimalTlsVersion;
/** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */
/** Flag to indicate enabling/disabling of Burst Capacity feature on the account */
enableBurstCapacity?: boolean;
/** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */
customerManagedKeyStatus?: string;
Expand Down Expand Up @@ -2842,7 +2842,7 @@ export interface DatabaseAccountCreateUpdateParameters
enablePartitionMerge?: boolean;
/** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */
minimalTlsVersion?: MinimalTlsVersion;
/** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */
/** Flag to indicate enabling/disabling of Burst Capacity feature on the account */
enableBurstCapacity?: boolean;
/** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */
customerManagedKeyStatus?: string;
Expand Down Expand Up @@ -4017,6 +4017,8 @@ export enum KnownServerVersion {
Five0 = "5.0",
/** Six0 */
Six0 = "6.0",
/** Seven0 */
Seven0 = "7.0",
}

/**
Expand All @@ -4029,7 +4031,8 @@ export enum KnownServerVersion {
* **4.0** \
* **4.2** \
* **5.0** \
* **6.0**
* **6.0** \
* **7.0**
*/
export type ServerVersion = string;

Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const accountName: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2024-05-15",
defaultValue: "2024-08-15",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
43 changes: 43 additions & 0 deletions sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import {
Recorder,
RecorderStartOptions,
env,
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id",
};

const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables,
};

describe("My test", () => {
let recorder: Recorder;

beforeEach(async function (this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function () {
await recorder.stop();
});

it("sample test", async function () {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/cosmosdb/arm-cosmosdb/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-cosmosdb": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down