What is the purpose of the validate element in the proxy base configuration XML file?

I noticed a "validate" element in my proxy base configuration file, but there is no mention of its purpose in the docs that I could find Base Configuration Elements. It showed up with a value of false after I created a revision (e.g. validate>false</validate>).

Any idea what this is for?

0 7 232
7 REPLIES 7

Former Community Member
Not applicable

Interesting observation, I see it in the XML schema but not sure either what's its purpose it. @arghya das any ideas?

adas
New Member

I think it validates the contents of the apiproxy bundle when validate=true. If there are any validation errors, like the flow refering to a policy that doesn't exist, it would throw a 400 error. When set to false, those validations do not happen.

I agree it might be required to validate the bundle while importing the bundle into the apigee edge.Though its an optional field so make sense to include it when we require the validation.

Right, I agree, I didn't explicitly set it I just noticed it in subsequent revisions of my API. Here's what I discovered.

Given local apiproxy files without a <validate> element

  1. Using Maven to create a new proxy revision, no <validate>
  2. Using Maven to update an existing revision, I get <validate>false</validate>
  3. If I save that same proxy using UI --> Save as new Revision or as API Proxy... the <validate> element is removed.
  4. If I import a proxy bundle without <validate>, no <validate> gets added.

So it appears to be something to do with Maven, however, the response from the upload indicates that no <validate> element is there, yet it is when I look at it in the UI.

Hmmm.

@Kurt Kanaskie

I'm wondering how does it work when you set validate "true" , you may want to check that if not done so. Does it give issue while importing or deployment ? Just wondering !

adas
New Member

The default value is false so all the above cases would imply the same thing. I would not sweat on it much.

This is mostly a curiosity, I'll add a note to the Doc page to update missing info.