added swagger_to_sdk_config.json and modified the gulpfile
This commit is contained in:
Родитель
87399f10d7
Коммит
b4cec938a8
31
gulpfile.js
31
gulpfile.js
|
@ -12,6 +12,16 @@ var mappings = {
|
|||
'source': 'arm-authorization/2015-07-01/swagger/authorization.json',
|
||||
'ft': 1
|
||||
},
|
||||
'batch.Management': {
|
||||
'dir': 'batchManagement/lib',
|
||||
'source': 'arm-batch/2015-12-01/swagger/BatchManagement.json',
|
||||
'ft': 1
|
||||
},
|
||||
'batch.Service': {
|
||||
'dir': 'batch/lib',
|
||||
'source': 'batch/2016-02-01.3.0/swagger/BatchService.json',
|
||||
'ft': 1
|
||||
},
|
||||
'cdn': {
|
||||
'dir': 'cdnManagement/lib',
|
||||
'source': 'arm-cdn/2015-06-01/swagger/cdn.json',
|
||||
|
@ -89,27 +99,22 @@ var mappings = {
|
|||
},
|
||||
'serviceFabric': {
|
||||
'dir': 'serviceFabric/lib',
|
||||
'source': 'arm-servicefabric/2016-01-28/swagger/servicefabric.json',
|
||||
'source': 'servicefabric/2016-01-28/swagger/servicefabric.json',
|
||||
'language': 'NodeJS'
|
||||
},
|
||||
'traffic':{
|
||||
'dir': 'trafficManagement2/lib',
|
||||
'source': 'arm-trafficmanager/2015-11-01/trafficmanager.json',
|
||||
'ft': 1
|
||||
},
|
||||
'website': {
|
||||
'dir': 'websiteManagement2/lib',
|
||||
'source': 'arm-web/2015-08-01/swagger/service.json',
|
||||
'ft': 1
|
||||
},
|
||||
'batch.Management': {
|
||||
'dir': 'batchManagement/lib',
|
||||
'source': 'arm-batch/2015-12-01/swagger/BatchManagement.json',
|
||||
'ft': 1
|
||||
},
|
||||
'batch.Service': {
|
||||
'dir': 'batch/lib',
|
||||
'source': 'batch/2016-02-01.3.0/swagger/BatchService.json',
|
||||
'ft': 1
|
||||
}
|
||||
};
|
||||
|
||||
var defaultAutoRestVersion = '0.16.0-Nightly20160411';
|
||||
var defaultAutoRestVersion = '0.16.0-Nightly20160413';
|
||||
var usingAutoRestVersion;
|
||||
var specRoot = args['spec-root'] || "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master";
|
||||
var project = args['project'];
|
||||
|
@ -170,7 +175,7 @@ function generateProject(project, specRoot, autoRestVersion) {
|
|||
console.log(util.format('Generating "%s" from spec file "%s" with language "%s" and AutoRest version "%s".',
|
||||
project, specRoot + '/' + mappings[project].source, language, autoRestVersion));
|
||||
autoRestExe = constructAutorestExePath(autoRestVersion);
|
||||
var cmd = util.format('%s -Modeler %s -CodeGenerator %s -Input %s -outputDirectory lib/services/%s -Header MICROSOFT_MIT',
|
||||
var cmd = util.format('%s -Modeler %s -CodeGenerator %s -Input %s -outputDirectory lib/services/%s -Header MICROSOFT_MIT_NO_VERSION',
|
||||
autoRestExe, currentModeler, language, specPath, mappings[project].dir);
|
||||
if (mappings[project].ft !== null && mappings[project].ft !== undefined) cmd += ' -FT ' + mappings[project].ft;
|
||||
if (mappings[project].args !== undefined) {
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
"meta": {
|
||||
"version": "0.1.0",
|
||||
"language": "NodeJS",
|
||||
"autorest": "latest"
|
||||
},
|
||||
"data": {
|
||||
"arm-authorization/2015-07-01/swagger/authorization.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/authorizationManagement/lib"
|
||||
},
|
||||
"arm-batch/2015-12-01/swagger/BatchManagement.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/batchManagement/lib"
|
||||
},
|
||||
"batch/2016-02-01.3.0/swagger/BatchService.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/batch/lib"
|
||||
},
|
||||
"arm-cdn/2015-06-01/swagger/cdn.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 2 -Modeler Swagger",
|
||||
"output_dir": "lib/services/cdnManagement/lib"
|
||||
},
|
||||
"arm-compute/compositeComputeClient.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler CompositeSwagger",
|
||||
"output_dir": "lib/services/computeManagement2/lib"
|
||||
},
|
||||
"arm-datalake-analytics/account/2015-10-01-preview/swagger/account.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/dataLake.Analytics/lib/account"
|
||||
},
|
||||
"arm-datalake-analytics/job/2015-11-01-preview/swagger/job.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/dataLake.Analytics/lib/job"
|
||||
},
|
||||
"arm-datalake-analytics/catalog/2015-10-01-preview/swagger/catalog.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/dataLake.Analytics/lib/catalog"
|
||||
},
|
||||
"arm-datalake-store/account/2015-10-01-preview/swagger/account.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/dataLake.Store/lib/account"
|
||||
},
|
||||
"arm-datalake-store/filesystem/2015-10-01-preview/swagger/filesystem.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/dataLake.Store/lib/filesystem"
|
||||
},
|
||||
"arm-graphrbac/1.6-internal/swagger/graphrbac.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/graphManagement/lib"
|
||||
},
|
||||
"arm-intune/2015-01-14-preview/swagger/intune.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/intune/lib"
|
||||
},
|
||||
"arm-network/2016-03-30/swagger/network.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/networkManagement2/lib"
|
||||
},
|
||||
"arm-redis/2015-08-01/swagger/redis.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/rediscachemanagement/lib"
|
||||
},
|
||||
"arm-resources/resources/2016-02-01/swagger/resources.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/resourceManagement/lib/resource"
|
||||
},
|
||||
"arm-resources/subscriptions/2015-11-01/swagger/subscriptions.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/resourceManagement/lib/subscription"
|
||||
},
|
||||
"arm-resources/locks/2015-01-01/swagger/locks.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/resourceManagement/lib/lock"
|
||||
},
|
||||
"arm-resources/features/2015-12-01/swagger/features.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/resourceManagement/lib/feature"
|
||||
},
|
||||
"arm-resources/policy/2016-04-01/swagger/policy.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/resourceManagement/lib/policy"
|
||||
},
|
||||
"arm-storage/2016-01-01/swagger/storage.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 2 -Modeler Swagger",
|
||||
"output_dir": "lib/services/storageManagement2/lib"
|
||||
},
|
||||
"servicefabric/2016-01-28/swagger/servicefabric.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -Modeler Swagger",
|
||||
"output_dir": "lib/services/serviceFabric/lib"
|
||||
},
|
||||
"arm-trafficmanager/2015-11-01/trafficmanager.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/trafficManagement2/lib"
|
||||
},
|
||||
"arm-web/2015-08-01/swagger/service.json": {
|
||||
"autorest_options": "-header MICROSOFT_MIT_NO_VERSION -FT 1 -Modeler Swagger",
|
||||
"output_dir": "lib/services/websiteManagement2/lib"
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче