By chance, there was another user that makes a request somehow close to yours (see https://forum.plantuml.net/9951/splicing-up-notes )
So now, with last beta, you can have :
@startuml
!function $json()
foo1: dummy1
foo2: dummy2
!endfunction
!function $get_response()
!return %retrieve_void_func("$json")
!endfunction
note left
response:
[[get-metadata-response.json{$get_response()} example response]]
endnote
@enduml
The %retrieve_void_func function calls the void function given in the first argument and return as a String the result of this void function.
So you can enhance this, assuming you have get-response.json and get-response2.json files in your local filesystem:
@startuml
!function $getFileContent($filename)
!include $filename
!endfunction
!function $get_response($file)
!return %retrieve_void_func("$getFileContent", $file)
!endfunction
start
note left
response:
[[get-metadata-response1.json{$get_response("get-response.json")} example response1]]
endnote
:next;
note right
response:
[[get-metadata-response2.json{$get_response("get-response2.json")} example response2]]
endnote
@enduml
This is a bit weird, but it works.
Is this what you were expecting ?