I know it looks like valid JSON, but it doesn't behave like it when viewed in VisualStudio Code or Notepad ++. These will both recognize valid JSON formatting, it's a single line of 100,000+ characters.
For example.
When I use a browser to view https://{NSLM-server}:8443/swagger.json, this is what the first few lines of the page looks like ...
{
"basePath": "/api",
"schemes": [
"https"
],
"swagger": "2.0",
"tags": [
{
"name": "events",
"description": "Event operations [Role: Administrator, Operator]"
},
{
"name": "admin",
"description": "Admin operations [Role: Administrator]"
},
{
"name": "jobs",
"description": "Job operations [Roles: Administrator, Operator]"
},
{
"name": "ontap2.0",
"description": "Clustered Data ONTAP operations [Roles: Administrator, Monitor, Operator]"
},
{
"name": "slo",
"description": "SLO operations [Roles: Administrator, Operator]"
}
],
In contrast, when I use a browser to view the swagger.json for WFA (https://{WFA-Server}/rest/swagger.json) is this what the first few lines of the page look like ... all 101,400 characters on a single line.
{"swagger":"2.0","info":{"version":"1.0","title":""},"basePath":"/rest","tags":[{"name":"Execution:Workflows"},{"name":"Execution:Data Sources"},{"name":"System:Backups"},{"name":"Designer:Remote System Types"},{"name":"System:System"},{"name":"System:User Management"},{"name":"Designer:Packs"},{"name":"Designer:Filters and Finders"},{"name":"Execution:Credentials"},{"name":"System:AutoSupport"},{"name":"System:Search"},{"name":"Execution:Schedules"},{"name":"Designer:Export and Import"},{"name":"Designer:Data Source Types"}],"paths":{"/backups":{"get":{"tags":["System:Backups"],"summary":"Backup the resources to local file","description":"Response with URL of backup file to be downloaded.<br><br><font color=\"red\"> Note: This documentation tool does not support testing this API.</font>","operationId":"backupAndLinkToLocalFile","parameters":[{"name":"full","in":"query","description":"Whether to perform a full backup. Full backup includes application configuration data along with normal backup content.<br> NOTE: Full backup contains the credentials of the storage systems added into WFA. Restoring this backup will provide access to all the storage systems.","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"post":{"tags":["System:Backups"],"summary":"Restores the resources from external backup file","description":"Input must be in multipart/form-data format. The KeyName for backup file in the form data must be \"backupFile\".<br>On success, response will have no content, in case of failure response has the error message.<br><br><font color=\"red\"> Note: This documentation tool does not support testing this API.</font>","operationId":"restoreFromExternalBackupPost","consumes":["multipart/form-data"],"parameters":[{"in":"body","name":"body","description":"The backup file with KeyName as \"backupFile\"","required":false,"schema":{"$ref":"#/definitions/MultipartFormDataInput"}},{"name":"full","in":"query","description":"Whether to perform a full restore, If this parameter is true while specifying a normal backup file, normal backup will be performed, similarly if this parameter is false and a full backup file is specified, a normal backup will be performed.","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"put":{"tags":["System:Backups"],"summary":"Restores the resources from external backup file","description":"Input must be in multipart/form-data format. The KeyName for backup file in the form data must be \"backupFile\".<br>On success, response will have no content, in case of failure response has the error message.<br><br><font color=\"red\"> Note: This documentation tool does not support testing this API.</font>","operationId":"restoreFromExternalBackup","consumes":["multipart/form-data"],"parameters":[{"in":"body","name":"body","description":"The backup file with KeyName as \"backupFile\"","required":false,"schema":{"$ref":"#/definitions/MultipartFormDataInput"}},{"name":"full","in":"query","description":"Whether to perform a full restore, If this parameter is true while specifying a normal backup file, normal backup will be performed, similarly if this parameter is false and a full backup file is specified, a normal backup will be performed","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/credentials":{"get":{"tags":["Execution:Credentials"],"summary":"Retrieves the list of configured credentials in the system","description":"","operationId":"getCredentials","consumes":["application/xml","application/json"],"produces":["application/xml","application/json"],"parameters":[{"name":"type","in":"query","description":"ConnectionType. Valid values are ONT
Thanks for the suggestion on the /rest/docs swagger interface. We're already using that to query, call, and validate workflows. The real goal of all this is to export the JSON that describes the actual WFA REST API so that it can be imported into another API abstraction tool called API Connect by IBM. Even if I could get the entire WFA swagger.json file properly formatted, I wouldn't want to import the entire thing into the customer facing asbtraction layer. I only want to publish a few of the WFA REST API functions. For example /workflows is something useful for my customers, but I don't need to export the /datasources, /backups, /dars, or /packs collections.
Thanks for any suggestions you can offer.