Container model json omits component properties, includes unnecessary authoring content
Bug present as of version: 2.24.7-SNAPSHOT
At least it seems like a bug to me. The model JSON for a container component omits things like the container ID, the container layout type, and the background style - i.e. fields on com.adobe.cq.wcm.core.components.internal.models.v1.LayoutContainerImpl. The model JSON includes a list of allowedComponents which really shouldnt need to be exported (more of an authoring need).
I believe this is due to the model.json being the AEM default for a responsivegrid component (which container extends). This can be resolved by adding the following to LayoutContainerImpl
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
The above "fix" only changes for the top-level container. For child containers to also display the container ID, layout type, and data layer in the model export, the adapters for LayoutContainerImpl must be updated as well.
adapters = {LayoutContainer.class, ComponentExporter.class, ContainerExporter.class}, // Add latter 2