Unable to deploy api proxy with a schema validation error by apigeetool

Scenario:

XYZ proxy is already in apigee edge cloud with the "Revision 1" in "dev" environment.

I am trying to deploy XYZ proxy to same environment as "Revision 2"

steps used:

run curl command to get the access token and save it in variable.

cd to the proxy folder and run the below command.

apigeetool deployproxy -o ${orgName} -e test -n ${proxyName} -t ${accessToken}

Error:

Error: Schema validation failed. Cause : unexpected element (uri:"", local:"Conditions"). Expected elements are <{}Condition>,<{}Name>,<{}FaultRules>. Line number : 16. Column number : 17. File name : NA.

the strange thing is it is importing a proxy with the new revision number but its unable to deploy to the respective environment.

Solved Solved
0 3 298
2 ACCEPTED SOLUTIONS

There seems to be a syntax error in your proxy. Look for a <Conditions> element. It should be <Condition>

View solution in original post

Do a search across all your directory, it may be in a target endpoint definition or such

View solution in original post

3 REPLIES 3

There seems to be a syntax error in your proxy. Look for a <Conditions> element. It should be <Condition>

ok but i saw the file "default.xml" under "proxies" directory.

It is already set like that.

<FaultRule name="wrongOrEmptyOrExpiredToken">
            <Step>
                <Name>needsJWT</Name>
            </Step>
            <Condition>(fault.name Matches "InvalidToken") or (fault.name Matches "TokenExpired") or (fault.name Matches "Unexpected")</Condition>
        </FaultRule>

Do a search across all your directory, it may be in a target endpoint definition or such