diff --git a/README_discovery.md b/README_discovery.md index 0304957..2f15f73 100644 --- a/README_discovery.md +++ b/README_discovery.md @@ -24,7 +24,7 @@ Along with all [common agent variables](https://docs.axway.com/bundle/amplify-ce | MULESOFT_AUTH_USERNAME | mulesoft.auth.username | The Mulesoft Anypoint username created for this agent | | | MULESOFT_AUTH_CLIENTID | mulesoft.auth.clientID | The client id of a defined connected app with all of the necessary permssions | | | MULESOFT_AUTH_CLIENTSECRET | mulesoft.auth.clientSecret | The client secret of a defined connected app with all of the necessary permssions | | -| MULESOFT_CACHEPATH | mulesoft.cachePath | Path entry to store stateful cache between agent invocations | _/tmp_ | +| MULESOFT_CACHEPATH | mulesoft.cachePath | Path entry to store stateful cache between agent invocations | _/data_ | | MULESOFT_DISCOVERYIGNORETAGS | mulesoft.discoveryIgnoreTags | Comma-separated black list of tags that, if any are present, will prevent an API being publised to Amplify Central. Take precedence over MULESOFT_DISCOVERYTAGS | (empty tag list) | | MULESOFT_DISCOVERYTAGS | mulesoft.discoveryTags | Comma-separated list of tags that, if any are present, will allow an API to be publised to Amplify Central. All APIs are discovered if not tags are specified | (empty tag list) | | MULESOFT_DISCOVERORIGINALRAML | mulesoft.discoverOriginalRAML | Set to true if the agent should discover the Assets that were created in RAML as RAML | _false_ | diff --git a/build/mulesoft_traceability_agent.yml b/build/mulesoft_traceability_agent.yml index eb5ac41..ab55df2 100644 --- a/build/mulesoft_traceability_agent.yml +++ b/build/mulesoft_traceability_agent.yml @@ -44,7 +44,7 @@ mulesoft_traceability_agent: mulesoft: environment: "${MULESOFT_ENVIRONMENT}" orgName: "${MULESOFT_ORGNAME}" - cachePath: "${MULESOFT_CACHEPATH:/tmp}" + cachePath: "${MULESOFT_CACHEPATH:/data}" pollInterval: ${MULESOFT_POLLINTERVAL:20s} useMonitoringAPI: "${MULESOFT_USEMONITORINGAPI}" auth: diff --git a/pkg/discovery/servicehandler.go b/pkg/discovery/servicehandler.go index 7154e1d..d34efc2 100644 --- a/pkg/discovery/servicehandler.go +++ b/pkg/discovery/servicehandler.go @@ -159,7 +159,10 @@ func (s *serviceHandler) getServiceDetail(asset *anypoint.Asset, api *anypoint.A } parser := apic.NewSpecResourceParser(rawSpec, "") - parser.Parse() + err = parser.Parse() + if err != nil { + return nil, err + } modifiedSpec, err := updateSpec(parser.GetSpecProcessor(), api.EndpointURI, configuration) if err != nil {