= Omit< RouteConfig
,
@@ -201,11 +202,15 @@ export class Router ,
handler: RequestHandler ,
- { isVersioned }: { isVersioned: boolean } = { isVersioned: false }
+ { isVersioned }: InternalRegistrarOptions = { isVersioned: false }
) => {
route = prepareRouteConfigValidation(route);
const routeSchemas = routeSchemasFromRouteConfig(route, method);
- const isPublicUnversionedRoute = route.options?.access === 'public' && !isVersioned;
+ const isPublicUnversionedApi =
+ !isVersioned &&
+ route.options?.access === 'public' &&
+ // We do not consider HTTP resource routes as APIs
+ route.options?.httpResource !== true;
this.routes.push({
handler: async (req, responseToolkit) =>
@@ -213,7 +218,7 @@ export class Router {RULE_FORM_ROUTE_PARAMS_ERROR_TEXT} {RULE_FORM_ROUTE_PARAMS_ERROR_TEXT} {RULE_FORM_CANCEL_MODAL_DESCRIPTION}