OpenAPI - exclude routes?

Hello,

Is there a way to mark certain operations (request DTOs) as ignored from schema? The excludeinschema doesn’t apply at the request level…

Similarly, if multiple routes are used for a certain operation,

[Route("/car")]
[Route("/cars")]
public class FindCars { ....}

Is there a way that the “preferred” one could be flagged to include, or certain ones to exclude?

thanks!

Any bespoke customization’s like this need to be done using the OpenApiFeature filters, e.g. you can use OpenApiDeclaration to remove paths you don’t want from the OpenApiDeclaration.Paths dictionary.