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-policy] Fix json format by prettier #60

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
3 changes: 2 additions & 1 deletion sdk/policy/arm-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ npm install @azure/arm-policy

##### Install @azure/ms-rest-nodeauth

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth@"^3.0.0"
```

##### Sample code
Expand Down
14 changes: 7 additions & 7 deletions sdk/policy/arm-policy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "PolicyClient Library with typescript type definitions for node.js and browser.",
"version": "2.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -20,11 +20,11 @@
"module": "./esm/policyClient.js",
"types": "./esm/policyClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/policy/arm-policy",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/policy/arm-policy/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
13 changes: 13 additions & 0 deletions sdk/policy/arm-policy/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ export interface PolicyAssignment extends BaseResource {
* The policy assignment metadata.
*/
metadata?: any;
/**
* The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. Possible
* values include: 'Default', 'DoNotEnforce'
*/
enforcementMode?: EnforcementMode;
/**
* The ID of the policy assignment.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand Down Expand Up @@ -311,6 +316,14 @@ export interface PolicySetDefinitionListResult extends Array<PolicySetDefinition
nextLink?: string;
}

/**
* Defines values for EnforcementMode.
* Possible values include: 'Default', 'DoNotEnforce'
* @readonly
* @enum {string}
*/
export type EnforcementMode = 'Default' | 'DoNotEnforce';

/**
* Defines values for ResourceIdentityType.
* Possible values include: 'SystemAssigned', 'None'
Expand Down
6 changes: 6 additions & 0 deletions sdk/policy/arm-policy/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ export const PolicyAssignment: msRest.CompositeMapper = {
name: "Object"
}
},
enforcementMode: {
serializedName: "properties.enforcementMode",
type: {
name: "String"
}
},
id: {
readOnly: true,
serializedName: "id",
Expand Down
2 changes: 1 addition & 1 deletion sdk/policy/arm-policy/src/policyClientContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class PolicyClientContext extends msRestAzure.AzureServiceClient {

super(credentials, options);

this.apiVersion = '2019-01-01';
this.apiVersion = '2019-06-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
2 changes: 1 addition & 1 deletion sdk/policy/arm-policy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"lib": ["es6", "dom"],
"declaration": true,
"outDir": "./esm",
"importHelpers": true
Expand Down
3 changes: 2 additions & 1 deletion swagger_to_sdk_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"typescript": "",
"license-header": "MICROSOFT_MIT_NO_VERSION",
"sdkrel:typescript-sdks-folder": ".",
"use": "@microsoft.azure/autorest.typescript@4.1.1"
"typescript.clear-output-folder": "",
"use": "@microsoft.azure/autorest.typescript@4.2.2"
},
"advanced_options": {
"clone_dir": "./azure-sdk-for-js",
Expand Down