Swagger having special characters after rendering on portal using apigee smartdocs maven plugin

We are using apigee smartdocs maven plugin via the CI/CD pipeline to render the swagger API on to the Drupal portal.

Though we have no errors, once it is rendered, the Download of the swagger from the portal shows us that the swagger is now having some extra elements like escape characters and { "0": "}, that is getting added to the swagger. Example of one such swagger is below.

Can someone please let us know why this could be happening.

[
  {
    "0": "},",
    "swagger": "\"2.0\",",
    "info": {
      "version": "\"1.0\",",
      "title": "v1"
    },
    "host": "\"xx.xxx.lorem.com\",",
    "basePath": "\"/v1.0/v1\",",
    "schemes\": [ \"https\" ], \"paths\": { \"/users{oktaid}\": { \"get\": { \"tags\": [ \"Users\" ], \"summary\": \"Returns Okta profile\", \"operationId\": \"users/{oktaid}_GET\", \"consumes\": [], \"produces\": [], \"parameters\": [ { \"name\": \"oktaid\", \"in\": \"path\", \"required\": true, \"description\": \"Okta id for a user.\", \"type\": \"string\" }, { \"name\": \"UserId\", \"in\": \"header\", \"required\": false, \"type\": \"string\" }, { \"name\": \"Authorization\", \"description\": \"This parameter represents the Authorization token obtained from the OKTA Authorization server. It is the Bearer token provided to authorize the consumer. Usage Authorization : Bearer token\", \"in\": \"header\", \"required\": true, \"type\": \"string\" }, { \"name\": \"apiKey\", \"description\": \"This parameter represents the API Key provided for the consumption of this resource. It is provided as the client_id when creating an associated App\", \"in\": \"header\", \"required\": true, \"type\": \"string\" } ], \"responses\": { \"200\": { \"description\": \"Success\" } } } } }, \"securityDefinitions\": { \"oauth2\": { \"name\": \"Authorization\", \"in\": \"header\", \"type\": \"apiKey\", \"description": {
      "\"Standard Authorization header using the Bearer scheme. Example": "\\\"bearer {token}\\\"\" } } }"
    }
  }
]
0 0 1,183
0 REPLIES 0