{ "swagger": "2.0", "info": { "title": "Bicep Client", "version": "2023-11-01", "description": "Bicep Client", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "DecompileOperationGroup" } ], "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep": { "post": { "operationId": "Decompile_Bicep", "tags": [ "DecompileOperationGroup" ], "description": "Decompiles an ARM json template into a Bicep template", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "decompileOperationRequest", "in": "body", "description": "The request body", "required": true, "schema": { "$ref": "#/definitions/DecompileOperationRequest" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/DecompileOperationSuccessResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Decompile an ARM json template into a Bicep file": { "$ref": "./examples/DecompileBicep.json" } } } } }, "definitions": { "DecompileOperationRequest": { "type": "object", "description": "The body of the request for the decompileBicep operation", "properties": { "template": { "type": "string", "description": "The ARM json template to be decompiled into a Bicep file" } }, "required": [ "template" ] }, "DecompileOperationSuccessResponse": { "type": "object", "description": "The response of the decompileBicep operation", "properties": { "files": { "type": "array", "description": "An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template", "items": { "$ref": "#/definitions/FileDefinition" }, "x-ms-identifiers": [ "path" ] }, "entryPoint": { "type": "string", "description": "The file path to the main Bicep file generated from the decompiled ARM json template." } }, "required": [ "files", "entryPoint" ] }, "FileDefinition": { "type": "object", "description": "The definition of a file along with its contents", "properties": { "path": { "type": "string", "description": "The file path of the Bicep file." }, "contents": { "type": "string", "description": "The contents of the Bicep file." } } } }, "parameters": {} }