Generating .autorest_generated.json for telemetry

This commit is contained in:
Varad Meru [gmail] 2020-09-30 01:23:11 -07:00
Родитель 69a9665917
Коммит b0896d8aec
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: D65E2959EB74910D
3 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -0,0 +1,4 @@
{
"name": "@autorest/azure-functions-python",
"version": {{version}}
}

Просмотреть файл

@ -142,6 +142,12 @@ class AzureFunctionsPythonSerializer(AzureFunctionsSerializer):
azure_functions_serializer.serialize_local_settings_json_file()
)
# Write the .autorest_generated.json file in the Azure Functions App folder
self.autorest_api.write_file(
function_app_path / Path(".autorest_generated.json"),
azure_functions_serializer.serialize_autorest_generated_json_file()
)
# Write the .gitignore file in the Azure Functions App folder
self.autorest_api.write_file(
function_app_path /
@ -254,6 +260,10 @@ class AzureFunctionsPythonAppSerializer(object):
azure_web_jobs_storage_secret='""',
language_worker_runtime='"python"'))
def serialize_autorest_generated_json_file(self):
template = self.env.get_template("autorest_generated.json.jinja2")
return prettify_json(template.render(version='"0.2.0-preview"'))
def serialize_proxies_json_file(self):
template = self.env.get_template("proxies.json.jinja2")
return template.render()

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "@autorest/azure-functions-python",
"version": "0.1.0-preview",
"description": "The Azure Functions extension for code generators in AutoRest.",
"version": "0.2.0-preview",
"description": "The Azure Functions extension for python code generators in AutoRest.",
"scripts": {
"prepare": "node run-python3.js prepare.py",
"start": "node run-python3.js start.py",
@ -21,9 +21,9 @@
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/Azure/autorest.python/issues"
"url": "https://github.com/Azure/autorest.azure-functions/issues"
},
"homepage": "https://github.com/Azure/autorest.python/blob/autorestv3/README.md",
"homepage": "https://github.com/Azure/autorest.azure-functions-python/",
"dependencies": {
"@azure-tools/extension": "^3.0.262"
},