- 08 Mar 2024
-
DarkLight
-
PDF
Broken References
- Updated on 08 Mar 2024
-
DarkLight
-
PDF
Breaking Change Notice (2023.2.0)
IAP 2023.2 introduces a breaking change which affects incorrectly defined applications and adapters.
Broken References
An application or adapter typically defines a method in its pronghorn.json
file with an input that refers to a JSON Schema by id
via the $ref
keyword. Itential discovered the JSON Schema pointed to by the $ref
expression was missing (did not exist), thereby forming a broken reference. However, the IAP HTTP server would ignore the missing reference, and allow any data type at that location.
With this breaking change, the 2023.2 IAP HTTP server now fails to run the method, returning a broken schema reference error message.
What should I do?
You will need to identify the broken references first, and then remediate via code change to the application and adapter model. Further information on how to do this is provided in the sections that follow.
Identify Broken References
Broken references may be identified by calling a method and examining the response. The message returned will be similar to this:
Broken $ref encountered while applying method input schemas: can't resolve reference my-missing-schema from id apiWithBrokenRef-inputOne
Remediate Broken References
If you encounter this issue in a custom application or adapter, you must make a code change to your application or adapter model. Make sure all $ref
expressions point to schemas which exist in the associated ./json-schema
directory. These schemas are identified by the value of their $id
property, not by their filename in the directory.