Schema update validation fails Azure logic apps

故事扮演 提交于 2020-04-30 06:38:07

问题


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. I.e. 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.


回答1:


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~



来源:https://stackoverflow.com/questions/60082415/schema-update-validation-fails-azure-logic-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!