REST Documentation: cannot override in order to exclude path

I’ve followed the official guide for the documentation generation (openapi file). I’m trying to generate a read-only openapi (for frontend consumers) so I want to exclude path.

I’ve followed this docs:

And added an override.ts file in src/extensions/documentation/ folder with the following code:

module.exports = {
  register({ strapi }) {
    strapi
      .plugin("documentation")
      .service("override")
      .excludeFromGeneration(["festival", "upload"]);
  }
}

It doesn’t work. Cannot understand why.

This topic has been created from a Discord post (1215678376829001778) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

I’ve moved the it inside the src/index.ts:

export default {
  register({ strapi }) {
    strapi
      .plugin("documentation")
      .service("override")
      .excludeFromGeneration(["upload", "Upload - File", "Festival"]);
  },

  bootstrap(/*{ strapi }*/) { },
};

Still the generated documentation includes those tags. What am I missing?