turkerdev / fastify-type-provider-zod

MIT License
337 stars 21 forks source link

Prevent invalid endpoints from being included in specification #11

Closed kibertoad closed 2 years ago

kibertoad commented 2 years ago

Previously unnecessary fastify-swagger endpoints ended up being included, and their wildcard variants messed up document completely, resulting in this:

  "/documentation/{wildcard}":
    get:
      responses:
        "200":
          description: Default Response
  "/documentation/static/{wildcard}":
    get:
      responses:
        "200":
          description: Default Response
  "{wildcard}":
    options:
      responses:
        "200":
          description: Default Response

Now they are excluded by default, and there is an option to provide custom skiplists if necessary. We should probably also look into handling of "*" of normal routes within transformer, I suspect they will get broken as well.

kibertoad commented 2 years ago

@turkerdev Could you take a look?