Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0d9a904
Fixed GetOperations route to not have subId (#3951)
johnemmanuelm Sep 19, 2018
f76c5a7
Modifying app version settings GET and UPDATE examples. (#3930)
LanaShafik Sep 19, 2018
109c990
[Azure monitor] Add missing enum for aggregation type (#3921)
binzhao-chn Sep 19, 2018
f2de2bb
Extract readme.nodejs.md from databox/resource-manager/readme.md (#3955)
Sep 19, 2018
804d486
[ApiManagement] Added missing 202 Accepted response code (#3952)
torresdal Sep 19, 2018
8571617
Remove serverAppSecret which is not required for AKS cluster updates …
feiskyer Sep 19, 2018
134772b
Fix Swagger Linting Error for Microsoft.Features (#3841)
zjpjack Sep 19, 2018
9d33ddd
[Datafactory] Add SecureInput property to Activity. Add recursive opt…
haricr Sep 19, 2018
0e79c73
update machine learning compute portion of the machine learning servi…
dagald-msft Sep 19, 2018
874b086
Add azure-sdk-for-js to compute/resource-manager/readme.md (#3937)
Sep 19, 2018
7c8e7d1
More detail added to the descriptions. (#3956)
axayjo Sep 19, 2018
93986e5
Fix typo, the provider should be Microsoft.Authorization (#3960)
zjpjack Sep 19, 2018
1a88657
Add hierarchyQueueNode into JobInformation(Basic) (#3942)
hosunmsft Sep 20, 2018
3b01760
Fix ARMViolations for Microsoft.Solutions (#3914)
zjpjack Sep 20, 2018
b3d4480
Kusto: Added more features such as: database operations, check cluste…
liatbezalel Sep 20, 2018
38cdfe0
Add azure-sdk-for-node to signalr/resource-manager/readme.md (#3967)
Sep 20, 2018
bdfeff1
Add MoT to Private Specs Repository (#3950)
sarangan12 Sep 20, 2018
cc1ac49
Applying changes for new version of Cost Management APIs 2018-08-31 (…
ms-premp Sep 20, 2018
57cc3b1
Change operationId of Microsoft.Authorization (#3969)
zjpjack Sep 20, 2018
9948def
Minor Fix (#3970)
sarangan12 Sep 20, 2018
4869e30
Move Go SDK config for back to its own config file (#3975)
jhendrixMSFT Sep 20, 2018
e9b8241
Quick fix to response type of runbookdraftcontent get (#3913)
Sep 20, 2018
be88f66
Updated comments and introduced AvailabilitySetSkuType to help users …
robhat1 Sep 21, 2018
d5b9478
Made minor change to gallery swagger. (#3981)
vanbasten2323 Sep 21, 2018
acaf947
Added API version 2018-10-01 (#3896)
rareddaz Sep 21, 2018
acd9ddb
Add compute 2018-10-01 to Go SDK (#3982)
jhendrixMSFT Sep 21, 2018
27a5ce0
Bringing conformance to the Disk version used in root tags. (#3939)
marstr Sep 21, 2018
5682ce2
Front Door publicpreview (#3973)
jmelvinwork Sep 21, 2018
0d19c5a
Removing reportconfig paths from stable version, as they are in previ…
ms-premp Sep 21, 2018
1f80a75
DeploymentManager: API Spec, examples - private preview (#3792)
deveshguha Sep 21, 2018
752cf8d
[Merge on 9/24/2018] Moving to Public Repository (#3929)
vivek-microsoft Sep 24, 2018
53d4771
Swagger changes for adding diffdisksettings property for the Ephemera…
hari-bodicherla Sep 24, 2018
d62e149
Rename Post to Grants (#3947)
lmazuel Sep 24, 2018
3cbe0db
Update frontdoor/resource-manager/readme.nodejs.md (#3986)
Sep 24, 2018
e572e4f
Update deploymentmanager/resource-manager/readme.nodejs.md (#3991)
Sep 24, 2018
a5dfa46
Replace generate-metadata with correct properties (#3992)
Sep 24, 2018
f726f98
Fix resources TypeScript generation (#3994)
Sep 24, 2018
04d9e24
Adding an example file for creating VM with differencing os disk usin…
hari-bodicherla Sep 24, 2018
1e92943
pretty output for semantic validation (#3959)
sergey-shandar Sep 25, 2018
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ script:
- >-
if [[ $MODE == 'semantic' ]]; then
npm install
npm test -- test/semantic.js
node scripts/semanticValidation.js
fi
- >-
if [[ $MODE == 'model' ]]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"json-schema-ref-parser": "^3.1.2",
"mocha": "*",
"oad": "^0.1.11",
"oav": "^0.5.2",
"oav": "^0.5.11",
"request": "^2.61.0",
"request-promise-native": "^1.0.5",
"z-schema": "^3.16.1"
Expand Down
25 changes: 18 additions & 7 deletions scripts/momentOfTruthPostProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

const fs = require('fs'),
utils = require('../test/util/utils'),
path = require('path');
path = require('path'),
gitHubPost = require('./postToGitHub');

let pullRequestNumber = utils.getPullRequestNumber();
let targetBranch = utils.getTargetBranch();
Expand All @@ -31,7 +32,7 @@ let githubFooter = `[AutoRest Linter Guidelines](https://github.com/Azure/azure-
`\n\nThanks for your co-operation.`;

let fileSummaryHeader = (file_name, file_href) => `## Config file: [${file_name}](${file_href})\n`;
let fileSummaryNewTemplate = (issue_type, issue_count, issue_table) => `### <a name="${issue_type.replace(/\s/g, "-")}s"></a>${iconFor(issue_type)} ${issue_count} new ${pluralize(issue_type, issue_count)}\n\n${issue_table}\n`;
let fileSummaryNewTemplate = (issue_type, issue_count, issue_table) => `<details><summary><h3 style="display: inline"><a name="${issue_type.replace(/\s/g, "-")}s"></a>${iconFor(issue_type)} ${issue_count} new ${pluralize(issue_type, issue_count)}</h3></summary><br>\n\n${issue_table}\n</details>`;
let fileSummaryExistingTemplate = (issue_type, issue_count, issue_table) => `<details><summary>${iconFor(issue_type)} ${issue_count} existing ${pluralize(issue_type, issue_count)}</summary><br>\n\n${issue_table}\n</details>\n\n`;

let potentialNewWarningErrorSummaryHeader = `
Expand Down Expand Up @@ -65,7 +66,10 @@ try {
}

function compareJsonRef(beforeJsonRef, afterJsonRef) {
return (beforeJsonRef.replace(/json:\d+:\d+/, '') == afterJsonRef.replace(/json:\d+:\d+/, ''));
beforeJsonRef = beforeJsonRef.replace(/.*\.json:\d+:\d+/, '')
afterJsonRef = afterJsonRef.replace(/.*\.json:\d+:\d+/, '')

return (beforeJsonRef == afterJsonRef);
}

function getOutputMessages(newSDKErrorsCount, newARMErrorsCount, newSDKWarningsCount, newARMWarningsCount) {
Expand Down Expand Up @@ -296,15 +300,15 @@ function postProcessing() {

let beforeErrorsAndWarningsArray = jsonData['files'][fileName]['before'];
beforeErrorsAndWarningsArray.forEach(beforeErrorOrWarning => {
if(beforeErrorOrWarning.type.toLowerCase() == 'warning'){
if(beforeErrorOrWarning.type != undefined && beforeErrorOrWarning.type.toLowerCase() == 'warning'){
if(beforeErrorOrWarning.validationCategory.toLowerCase() == 'sdkviolation') {
beforeWarningsSDKArray.push(beforeErrorOrWarning);
} else {
beforeWarningsARMArray.push(beforeErrorOrWarning);
}
}

if(beforeErrorOrWarning.type.toLowerCase() == 'error'){
if(beforeErrorOrWarning.type != undefined && beforeErrorOrWarning.type.toLowerCase() == 'error'){
if(beforeErrorOrWarning.validationCategory.toLowerCase() == 'sdkviolation') {
beforeErrorsSDKArray.push(beforeErrorOrWarning);
} else {
Expand All @@ -315,15 +319,15 @@ function postProcessing() {

let afterErrorsAndWarningsArray = jsonData['files'][fileName]['after'];
afterErrorsAndWarningsArray.forEach(afterErrorOrWarning => {
if(afterErrorOrWarning.type.toLowerCase() == 'warning'){
if(afterErrorOrWarning.type != undefined && afterErrorOrWarning.type.toLowerCase() == 'warning'){
if(afterErrorOrWarning.validationCategory.toLowerCase() == 'sdkviolation') {
afterWarningsSDKArray.push(afterErrorOrWarning);
} else {
afterWarningsARMArray.push(afterErrorOrWarning);
}
}

if(afterErrorOrWarning.type.toLowerCase() == 'error'){
if(afterErrorOrWarning.type != undefined && afterErrorOrWarning.type.toLowerCase() == 'error'){
if(afterErrorOrWarning.validationCategory.toLowerCase() == 'sdkviolation') {
afterErrorsSDKArray.push(afterErrorOrWarning);
} else {
Expand Down Expand Up @@ -356,6 +360,7 @@ function postProcessing() {
console.log("Existing ARM Errors: ", existingARMErrors.length);
console.log("Existing ARM Warnings: ", existingARMWarnings.length);
console.log();

if (newSDKErrors.length > 0) {
console.log(`Potential new SDK errors`)
console.log("========================");
Expand Down Expand Up @@ -403,6 +408,12 @@ function postProcessing() {
console.log(JSON.stringify(output, null, 2));
console.log("---");

if(process.env.TRAVIS_REPO_SLUG != undefined && process.env.TRAVIS_REPO_SLUG.endsWith("-pr")) {
let slug = process.env.TRAVIS_REPO_SLUG;
slug = slug.split("/")[1];
gitHubPost.postGithubComment("Azure", slug, pullRequestNumber, output.text);
}

if (newSDKErrorsCount > 0 || newARMErrorsCount > 0) {
process.exitCode = 1;
}
Expand Down
29 changes: 29 additions & 0 deletions scripts/postToGitHub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

'use strict';

const octokit = require('@octokit/rest')();
let token = process.env.GITHUB_TOKEN;

if(token != undefined) {
octokit.authenticate({
type: 'token',
token: token
});
}

module.exports = {
postGithubComment: function(owner, repository, prNumber, commentBody) {
octokit.issues.createComment({
"owner": owner,
"repo": repository,
"number": prNumber,
"body": commentBody
}).then(data => {
console.log("Comment has been posted");
}). catch(err => {
console.log(err);
});
}
}
20 changes: 20 additions & 0 deletions scripts/semanticValidation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License in the project root for license information.
'use strict';

const utils = require('../test/util/utils')
const oav = require('oav');

async function main() {
const swaggersToProcess = utils.getFilesChangedInPR();
// Useful when debugging a test for a particular swagger.
// Just update the regex. That will return an array of filtered items.
// swaggersToProcess = swaggersToProcess.filter(function(item) {
// return (item.match(/.*Microsoft.Logic.*2016-06-01.*/ig) !== null);
// });
for (const swagger of swaggersToProcess) {
await oav.validateSpec(swagger, {consoleLogLevel: 'error', pretty: true});
}
}

main()
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@
"schema": {
"$ref": "#/definitions/ApiManagementServiceResource"
}
},
"202": {
"description": "Accepted",
"schema": {
"$ref": "#/definitions/ApiManagementServiceResource"
}
}
},
"x-ms-long-running-operation": true
Expand Down Expand Up @@ -1389,4 +1395,4 @@
}
},
"parameters": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"parameters": {
"parameters": {
"location": "Central US",
"sku": {
"name": "Premium",
Expand Down Expand Up @@ -206,6 +206,85 @@
"capacity": 1
}
}
},
"202": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "Central US",
"etag": "AAAAAAAXXwI=",
"properties": {
"publisherEmail": "admin@live.com",
"publisherName": "contoso",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2017-05-30T19:00:47.1121713Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "proxyhostname1.contoso.com",
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "918D7785B926AC5AEE66322778A147BCE7237CF3",
"subject": "CN=proxyhostname1.contoso.com"
}
},
{
"type": "Proxy",
"hostName": "proxyhostname2.contoso.com",
"negotiateClientCertificate": true,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "918D7785B926AC5AEE66322778A147BCE7237CF3",
"subject": "CN=proxyhostname2.contoso.com"
}
},
{
"type": "Portal",
"hostName": "portalhostname1.contoso.com",
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "918D7785B926AC5AEE66322778A147BCE7237CF3",
"subject": "CN=portalhostname1.contoso.com"
}
}
],
"staticIps": [
"52.173.193.207"
],
"additionalLocations": [
{
"location": "West US",
"sku": {
"name": "Premium",
"capacity": 1
},
"staticIps": [
"104.210.41.234"
],
"virtualNetworkConfiguration": {
"subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subnets/apimSubnet"
}
}
],
"virtualNetworkConfiguration": {
"subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/centralUsVirtualNetwork/subnets/apimSubnet"
},
"virtualNetworkType": "External"
},
"sku": {
"name": "Premium",
"capacity": 1
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,35 @@
"capacity": 1
}
}
},
"202": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "West US",
"etag": "AAAAAAAV8XM=",
"properties": {
"publisherEmail": "admin@live.com",
"publisherName": "Contoso",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2015-09-22T01:52:02.4307221Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"staticIps": [
"xx.xx.250.222"
],
"virtualNetworkType": "None"
},
"sku": {
"name": "Premium",
"capacity": 1
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,35 @@
"tenantId": "72f988bf-xxxx-41af-xxxx-2d7cd011db47"
}
}
},
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2017-03-01"
},
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"location": "Japan East",
"etag": "AAAAAAC268k=",
"properties": {
"publisherEmail": "admin@contoso.com",
"publisherName": "Contoso",
"notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com",
"provisioningState": "Created",
"targetProvisioningState": "Activating",
"createdAtUtc": "2017-10-27T23:41:41.7231779Z"
},
"sku": {
"name": "Developer",
"capacity": 1
},
"identity": {
"type": "SystemAssigned",
"principalId": "f4b0f1c2-xxxx-43db-xxxx-ccd99e1afd22",
"tenantId": "72f988bf-xxxx-41af-xxxx-2d7cd011db47"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"200": {
"description": "OK",
"schema": {
"type": "string"
"type": "file"
}
},
"default": {
Expand Down
Loading