Defining index template mapping for OpenAPI Spec Json

Hello All,

I am currently defining an index for storing all OpenAPI Spec (3.0 and above) internal to our organization and made is searchable.

Example: OpenAPI-Specification/api-with-examples.json at main · OAI/OpenAPI-Specification · GitHub

When defining the mapping met with the scenario where, “paths” section has different keys with standard spec for the contents.

Any suggestion on how to approach this as field name is dynamic here.

Thanks