The approach here will be to manually add methods to affected model classes (e.g. adding getName() to SchemaImpl). These methods can be replaced by generated methods if https://github.com/RepreZen/JsonOverlay/issues/4 gets implemented.
The methods will return the same value as Overlay#getPathInParent, as long as the parent overlay is a MapOverlay. Otherwise it will return null, meaning that the object instance is unnamed (e.g. an inlined media type schema, or a shema that appears only through references and therefore has no actual parent in the overlay structure.
The approach here will be to manually add methods to affected model classes (e.g. adding
getName()
toSchemaImpl
). These methods can be replaced by generated methods if https://github.com/RepreZen/JsonOverlay/issues/4 gets implemented.The methods will return the same value as
Overlay#getPathInParent
, as long as the parent overlay is aMapOverlay
. Otherwise it will return null, meaning that the object instance is unnamed (e.g. an inlined media type schema, or a shema that appears only through references and therefore has no actual parent in the overlay structure.