I am developing a very simple widget that generates a feature layer. This widget does not have any setting file as it does not require any input data sources. I would like to create an output data source with the feature layer data. Here is the beginning of my widget.tsx code:
const [myDSout, setMyDSout] = useState<FeatureLayerDataSource>(null)
const outputDsJsons: DataSourceJson[] = [{
id: "widget_1_ouput",
isOutputFromWidget: true,
isDataInDataSourceInstance: true,
label: "MyDSoutput",
type: "FEATURE_LAYER"
}]
DataSourceManager.getInstance().createDataSource(outputDsJsons[0]).then((result: FeatureLayerDataSource) => {
setMyDSout(result);
});
I got the following message: "Datasource without origin data source must save the schema in app config"
I have manually modified the entry for "widget_1_ouput" in the dataSources section of the config file of my app (the one found in the server\public\apps\3\resources\config) with an entry schema without any effects.
Obviously this is not the right approach, so here is my question: What is the right way to save a schema in an app config?
Thanks for any comments.