pnp / sp-dev-site-scripts

Repository for sample SharePoint site designs and site scripts
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
MIT License
162 stars 68 forks source link

When using /_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptFromWeb Document libraries exports are invalid #59

Open Pieter-Veenstra opened 3 years ago

Pieter-Veenstra commented 3 years ago

Category

Expected or Desired Behavior

The /_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptFromWeb endopoint should generate a valid site script that can be used during the import

Observed Behavior

When the following is included in the body of the call to the end point

   "IncludedLists":[ 
         "Shared Documents"
      ],

I'm getting the following included in my exported script

{
            "listName": "Documents",
            "subactions": [
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addSPFieldXml"
                },
                {
                    "verb": "addContentType"
                },
                {
                    "verb": "addContentType"
                },
                {
                    "verb": "addContentType"
                },
                {
                    "verb": "addContentType"
                },
                {
                    "verb": "addContentType"
                },
                {
                    "verb": "addSPView"
                },
                {
                    "verb": "addSPView"
                }
            ],
            "templateType": 101,
            "verb": "createSPList"
        },

The verbs seem to be included but the details are not.

Steps to Reproduce

Call the endpoint mentioned above and include a document library. In my case I'm calling the endpoint from a flow, however that should be irrelevant.