Resolve concerns the process of obtaining a mapping configuration by merging a base (product configuration), different layers of project configuration files, and different layers of client configuration files.
Explain is the process of obtaining an exploded version of this configuration with all the information that indicates how this configuration was obtained: file location, qualifications of these files, plugins, description and contents of overloaded layers, files ignored or in error, and so on. Various options allow you to control the verbosity of the explain.
A configuration is obtained according to a connection context, which includes, among others:
a surfer, connected or not
a mapping (so the corresponding path)
query parameters
headers
etc.
Resolve
Standard API
GET /api/portalconfig/config
Gets the mapping configuration specified for the current connection context.
See documentation (sk): https://starter-kit.wedia-group.com/api/portalconfig?export=redoc#tag/config/operation/configGet
Extended API
GET /api/portalconfig/config/merge
This API does exactly the same thing as /config, but the context can be specified by parameter, and you can filter the resulting configuration, as well as choose the format (json or xjson). You can even define a mapping on the fly to test a path, or simulate processors.
See documentation (sk): https://starter-kit.wedia-group.com/api/portalconfig?export=redoc#tag/config/operation/configMerge
Explain API
GET /api/portalconfig/config/explain
This API explains how to build the configuration obtained by calling a /config
or /config/merge service.
See documentation (sk): https://starter-kit.wedia-group.com/api/portalconfig?export=redoc#tag/config/operation/configExplain
As the JSON you get can be very wordy and rather tedious to interpret, you can use (or be inspired by) the Configuration Debug or Configuration Layers sections of the toolkit, as these pages use this service.
Debugging variant
POST /api/portalconfig/tools/file/resolve
This API, which can only be invoked under administrative authentication, allows you to simulate a resolve (or explain) from local files, without installing them on the server.
See documentation (sk): https://starter-kit.wedia-group.com/api/portalconfig?export=redoc#tag/admin/operation/admFileResolve
Embedding in a JSP
It is possible to include a configuration using the JSP /page/config_resolver/config_before.jsp
.
This does exactly what the GET /api/portalconfig/config
service does.
Parameter
mappingID
:
(string, mandatory) the mapping ID
Example
From PACKAGED_Portal/vue.config.js
:
<noheto:include page="/config_resolver/config.jspz?mappingID=${name}" var="jsonConfig"/>