Родитель
fe3ad548ff
Коммит
7ccadc727b
|
@ -368,7 +368,7 @@ module.exports =
|
|||
|
||||
autorest: (args,done,ignoreexitcode) ->
|
||||
echo info "Queuing up: AutoRest #{args.join(' ')}"
|
||||
execute "autorest \"--use=#{basefolder}\" #{args.map((a) -> "\"#{a}\"").join(' ')}" , {silent:true, ignoreexitcode: ignoreexitcode || false}, (code,stdout,stderr) ->
|
||||
execute "#{basefolder}/node_modules/.bin/autorest \"--use=#{basefolder}\" #{args.map((a) -> "\"#{a}\"").join(' ')}" , { silent:true, ignoreexitcode: ignoreexitcode || false }, (code,stdout,stderr) ->
|
||||
return done(code,stdout,stderr)
|
||||
|
||||
# build task for global build
|
||||
|
@ -411,9 +411,9 @@ Import
|
|||
now: moment().format('YYYYMMDD-HHmm')
|
||||
force: argv.force or false
|
||||
threshold: argv.threshold or ((os.cpus().length)-1) or 1
|
||||
verbose: argv.verbose or null
|
||||
workdir: "#{process.env.tmp}/gulp/#{module.exports.guid()}"
|
||||
watch: argv.watch or false
|
||||
global.verbose = argv.verbose or null
|
||||
|
||||
mkdir "-p", workdir if !test "-d", workdir
|
||||
|
||||
|
|
|
@ -19,6 +19,30 @@ task 'init', "" ,(done)->
|
|||
Fail "YOU MUST HAVE NODEJS VERSION GREATER THAN 7.10.0" if semver.lt( process.versions.node , "7.10.0" )
|
||||
done()
|
||||
|
||||
|
||||
|
||||
# Run language-specific tests:
|
||||
task 'test', "more", [], (done) ->
|
||||
done();
|
||||
|
||||
# CI job
|
||||
task 'testci', "more", [], (done) ->
|
||||
# install latest AutoRest
|
||||
await autorest ["--latest"], defer code, stderr, stdout
|
||||
|
||||
## TEST SUITE
|
||||
global.verbose = true
|
||||
await run "test", defer _
|
||||
|
||||
## REGRESSION TEST
|
||||
global.verbose = false
|
||||
# regenerate
|
||||
await run "regenerate", defer _
|
||||
# diff ('add' first so 'diff' includes untracked files)
|
||||
await execute "git add -A", defer code, stderr, stdout
|
||||
await execute "git diff --staged -w", defer code, stderr, stdout
|
||||
# eval
|
||||
echo stderr
|
||||
echo stdout
|
||||
throw "Potentially unnoticed regression (see diff above)! Run `npm run regenerate`, then review and commit the changes." if stdout.length + stderr.length > 0
|
||||
done()
|
|
@ -15,6 +15,7 @@ regenExpected = (opts,done) ->
|
|||
swaggerFiles = (if optsMappingsValue instanceof Array then optsMappingsValue[0] else optsMappingsValue).split(";")
|
||||
args = [
|
||||
"--#{opts.language}",
|
||||
"--clear-output-folder",
|
||||
"--output-folder=#{outputDir}/#{key}",
|
||||
"--license-header=#{if !!opts.header then opts.header else 'MICROSOFT_MIT_NO_VERSION'}"
|
||||
]
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
"description": "The Azure Resource Schema extension for classic generators in AutoRest.",
|
||||
"scripts": {
|
||||
"start": "dotnet src/bin/netcoreapp2.0/autorest.azureresourceschema.dll --server",
|
||||
"test": "gulp test",
|
||||
"test": "gulp testci",
|
||||
"testci": "gulp testci",
|
||||
"build": "gulp build",
|
||||
"prepare": "gulp build",
|
||||
"regenerate": "gulp regenerate",
|
||||
"clean": "gulp clean",
|
||||
"nuke": "git clean -xdf"
|
||||
},
|
||||
|
@ -28,6 +30,7 @@
|
|||
"homepage": "https://github.com/Azure/autorest.azureresourceschema/blob/master/README.md",
|
||||
"devDependencies": {
|
||||
"@microsoft.azure/autorest.modeler": "1.9.6",
|
||||
"autorest": "^1.9.1",
|
||||
"coffee-script": "^1.11.1",
|
||||
"dotnet-sdk-2.0.0": "^1.1.1",
|
||||
"gulp": "^3.9.1",
|
||||
|
|
|
@ -0,0 +1,373 @@
|
|||
{
|
||||
"id": "https://schema.management.azure.com/schemas/2015-02-01-preview/Microsoft.Logic.json#",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Microsoft.Logic",
|
||||
"description": "Microsoft Logic Resource Types",
|
||||
"resourceDefinitions": {
|
||||
"workflows": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Microsoft.Logic/workflows"
|
||||
]
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"2015-02-01-preview"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the resource id."
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the resource location."
|
||||
},
|
||||
"tags": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the resource tags."
|
||||
},
|
||||
"properties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/WorkflowProperties"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the workflow properties."
|
||||
},
|
||||
"resources": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/workflows_accessKeys_childResource"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"type",
|
||||
"apiVersion",
|
||||
"properties"
|
||||
],
|
||||
"description": "Microsoft.Logic/workflows"
|
||||
},
|
||||
"workflows_accessKeys": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Microsoft.Logic/workflows/accessKeys"
|
||||
]
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"2015-02-01-preview"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the resource id."
|
||||
},
|
||||
"properties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/WorkflowAccessKeyProperties"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the workflow access key properties."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"type",
|
||||
"apiVersion",
|
||||
"properties"
|
||||
],
|
||||
"description": "Microsoft.Logic/workflows/accessKeys"
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"ContentHash": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"algorithm": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the algorithm."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the value."
|
||||
}
|
||||
}
|
||||
},
|
||||
"ContentLink": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the content link URI."
|
||||
},
|
||||
"contentVersion": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the content version."
|
||||
},
|
||||
"contentSize": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the content size."
|
||||
},
|
||||
"contentHash": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ContentHash"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the content hash."
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Gets or sets the metadata."
|
||||
}
|
||||
}
|
||||
},
|
||||
"ResourceReference": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the resource id."
|
||||
}
|
||||
}
|
||||
},
|
||||
"Sku": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NotSpecified",
|
||||
"Free",
|
||||
"Shared",
|
||||
"Basic",
|
||||
"Standard",
|
||||
"Premium"
|
||||
]
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the name."
|
||||
},
|
||||
"plan": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ResourceReference"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the reference to plan."
|
||||
}
|
||||
}
|
||||
},
|
||||
"WorkflowAccessKeyProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"notBefore": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Gets or sets the not-before time."
|
||||
},
|
||||
"notAfter": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Gets or sets the not-after time."
|
||||
}
|
||||
}
|
||||
},
|
||||
"WorkflowParameter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NotSpecified",
|
||||
"String",
|
||||
"SecureString",
|
||||
"Int",
|
||||
"Float",
|
||||
"Bool",
|
||||
"Array",
|
||||
"Object",
|
||||
"SecureObject"
|
||||
],
|
||||
"description": "Gets or sets the type."
|
||||
},
|
||||
"value": {
|
||||
"description": "Gets or sets the value."
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Gets or sets the metadata."
|
||||
}
|
||||
}
|
||||
},
|
||||
"WorkflowProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NotSpecified",
|
||||
"Enabled",
|
||||
"Disabled",
|
||||
"Deleted",
|
||||
"Suspended"
|
||||
]
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the state."
|
||||
},
|
||||
"sku": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Sku"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the sku."
|
||||
},
|
||||
"definitionLink": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ContentLink"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the link to definition."
|
||||
},
|
||||
"definition": {
|
||||
"description": "Gets or sets the definition."
|
||||
},
|
||||
"parametersLink": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ContentLink"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the link to parameters."
|
||||
},
|
||||
"parameters": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/WorkflowParameter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the parameters."
|
||||
}
|
||||
}
|
||||
},
|
||||
"workflows_accessKeys_childResource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"accessKeys"
|
||||
]
|
||||
},
|
||||
"apiVersion": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"2015-02-01-preview"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Gets or sets the resource id."
|
||||
},
|
||||
"properties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/WorkflowAccessKeyProperties"
|
||||
},
|
||||
{
|
||||
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
|
||||
}
|
||||
],
|
||||
"description": "Gets or sets the workflow access key properties."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"type",
|
||||
"apiVersion",
|
||||
"properties"
|
||||
],
|
||||
"description": "Microsoft.Logic/workflows/accessKeys"
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче