code: def on_before_transform_template(self, template_dict):
          
          template = SamTemplate(template_dict)
  
          for logicalId, api in template.iterate(SamResourceType.Api.value):
              if api.properties.get('DefinitionBody') or api.properties.get('DefinitionUri'):
                  continue
  
              api.properties['DefinitionBody'] = SwaggerEditor.gen_skeleton()
              api.properties['__MANAGE_SWAGGER'] = True
docs: Hook method that gets called before the SAM template is processed.
          The template has passed the validation and is guaranteed to contain a non-empty "Resources" section.
  
          :param dict template_dict: Dictionary of the SAM template
          :return: Nothing