I have designed my own webthings (framework, python) to control DIY LEDs from a Raspberry Pi 0. It works.
I have set-up a gateway 12.0 on a Raspberry Pi 4. It works.
I am now learning my way through creating an add-on, the purpose of which is to replace the Things view (eventually) (for my Gateway).
One piece of information that does not seem to bubble up in the gateway from my native webthings is their “id”. The solution I found is to either use API.getThings in the extension.js cient script or localhost/things in the API Handler, from this, find out a list of webthing servers, then request things from the webthing servers (from the API handler), collect the relevant information and pass it back on to the client - not withstanding changes to the list of things.
Hoping someone has an easier, more efficient answer to my search.