简体   繁体   中英

Schema update validation fails Azure logic apps

In my Logic app I am using HTTP trigger which fires every 3 hours and using a get request on it. After the API responds, the parse JSON call does schema validation. So far with HTTP trigger and Parse JSON, I don't know a way to disable validation of JSON. I know 'when HTTP request is received' as disable validation option but in my case I don't need 'When http request is recieved', I need HTTP trigger on recurrence basis.

Here are my two questions 1) Is there a way to disable schema validation when using HTTP trigger that fires every so often on recurrence basis?

2) The API calls that we make to a company, it seems like the company frequently updates their JSON return schema. On Monday the calls were going through correctly, on Tuesday, they were not. Upon asking them, this is their response. "But almost all changes are "adding", rather than "removing" or "renaming" endpoints and information. Ie the changes are backward compatible."

My question is adding to schema.. is the validation supposed to fail upon addition because logic app for sure is not validating their additions whereas their representative makes it sound like 'adding' should be backwards compatible. Do addition in schema's cause validation to fail?

I am learning Azure logic apps and not familiar with all components at hand. What is the best way to handle JSON parsing in case schema changes frequently and how to turn it off if that is a solution.

在此处输入图片说明

在此处输入图片说明

In your second screenshot, it seems there is nothing to do with the "HTTP Trigger". The problem is caused by the schema in "Parse JSON"(Parse Organization and Group Information) action. You need to confirm with the company and unify the structure of the json data with them.

In your first screenshot, I think you need to confirm with the company if they have the array in the response json data. Apart from this, we can judge if the array exists and then do the "Select" action, shown as below:

在此处输入图片说明 The fx expression in the "Condition" is:

empty(body('Parse_JSON')?['array'])

Hope it helps~

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM