It seems to be rather uncommon to include an operation in an OpenAPI definition that returns an OpenAPI document.
One of the reasons for excluding the operation would be that it will not work well with code generation tool.
Proposal: Simply require that the OpenAPI definition is available at /api, but drop the example and exclude the /api operation from all other examples, too.
It seems to be rather uncommon to include an operation in an OpenAPI definition that returns an OpenAPI document.
One of the reasons for excluding the operation would be that it will not work well with code generation tool.
Proposal: Simply require that the OpenAPI definition is available at /api, but drop the example and exclude the /api operation from all other examples, too.