The ui.config Maven module is a dedicated place to hold the OSGI configurations that you want to distribute. The structure of the module follows some conventions:
Everything up to (and including) the “jcr_content” folder is part of the Maven module structure (same as with “regular” Java modules holding all packages within the /src/main/java structure). Everything inside the “jcr_content” folder reflects the structure and hierarchy that will be created by the CRX package that the Maven module creates at build time.
Inside the repository all your project specific application code (including OSGI configs) should reside in the “/apps” tree. You will usually create your own folder (e. g. /apps/mysite) that holds all your templates, components, OSGI configs and more.
With regards to the OSGI configs, I have already outlined the naming convention of their respective folders (usually “config” or “config.RUNMODE”). Inside that/these folder/s you can create your OSGI configuration files. These files have to reflect the OSGI bundles PID (basically: fully qualified class name). So an according filename for your MyService class would be “com.adobe.aem.guides.wknd.core.services.MyService.cfg.json”.
Once you deploy your package (which will include the OSGI bundle at /apps/mysite/install/ and your OSGI config at /apps/mysite/config/) everything should be set. AEM will take care if deploying the OSGI bundle from the “install” folder to the OSGI context and apply the according config from the “config” folder. There is nothing more to do.
Recapitulating your specific questions:
Are these files, their location, naming and content structure documented? ==> Unfortunately, I’m not aware of a documentation covering this topic from this angle.
What should the corresponding config file be called? ==> com.adobe.aem.guides.wknd.core.services.MyService.cfg.json (reflecting yourn services PID aka fully qulified class name)
Where should it be located? ==> ui.config/src/main/content/jcr_root/apps/mysite/config/ (will be mapped to /apps/mysite/config/ inside the repository)
How do we link our services config params to the config file? ==> That’s handled automatically, just follow the above naming conventions (config file name = PID of OSGI service). The parameter names inside the config file need to match your definition in your service class.
/aem-guides-wknd.core/src/main/java/com/adobe/aem/guides/wknd/core/services/ folder and the interface name is MyService.java
then you must have an Implementation class implementing the above interface which I believe you would have kept under
/aem-guides-wknd.core/src/main/java/com/adobe/aem/guides/wknd/core/services/impl with class name MyServiceImpl.java
If the above statements are true, then your config file will be kept under:
/apps/wknd/runmodes/config path with file name as:
com.adobe.aem.guides.wknd.core.services.imp.MyServiceImpl.xml (it will be full qualified name of the class with .xml as the extension for AEM 6.5 and for cloud service it will be .cfg.json with will be a JSON file)