Documentation
    Preparing search index...

    Output of a scanned route containing all extracted metadata including controller information, validators, request/response types, and route patterns.

    const scannedRoute: ScannedRoute = {
    name: 'users.store',
    methods: ['POST'],
    domain: 'root',
    pattern: '/users',
    tokens: [{ val: '/users', old: '/users', type: 0, end: '' }],
    request: {
    type: 'Infer<typeof createUserValidator>',
    imports: ['import { Infer } from "@vinejs/vine/types"']
    },
    response: {
    type: 'ReturnType<UsersController["store"]>',
    imports: []
    },
    validators: [{
    name: 'createUserValidator',
    import: { type: 'named', specifier: '#validators/user', value: 'createUserValidator' }
    }],
    controller: {
    name: 'UsersController',
    method: 'store',
    path: '/app/controllers/users_controller.ts',
    import: { type: 'default', specifier: '#controllers/users_controller', value: 'UsersController' }
    }
    }
    type ScannedRoute = {
        name: string;
        methods: string[];
        domain: string;
        pattern: string;
        tokens: { val: string; old: string; type: 0 | 1 | 2 | 3; end: string }[];
        request?: { type: string; imports: string[] };
        response?: { type: string; imports: string[] };
        validators?: ScannedValidator[];
        controller?: ScannedController;
    }
    Index

    Properties

    name: string

    A unique name for the route provided by AdonisJS http-server. May be duplicate across different domains.

    methods: string[]

    HTTP methods for which the route is defined (GET, POST, PUT, etc.)

    domain: string

    The domain on which the route is registered (typically 'root')

    pattern: string

    The route pattern with parameter placeholders (e.g., '/users/:id')

    tokens: { val: string; old: string; type: 0 | 1 | 2 | 3; end: string }[]

    Route tokens that can be used for constructing URIs without parsing the pattern. Contains information about static and dynamic segments.

    request?: { type: string; imports: string[] }

    Inferred request data type accepted by the route. Generated when the route uses a controller with validators.

    Type Declaration

    • type: string

      TypeScript type definition for the request data

    • imports: string[]

      Import statements needed for the type definition

    response?: { type: string; imports: string[] }

    Inferred response type returned by the route. Generated when the route uses a controller method.

    Type Declaration

    • type: string

      TypeScript type definition for the response data

    • imports: string[]

      Import statements needed for the type definition

    validators?: ScannedValidator[]

    Extracted validator information from the controller method. Only present when using controller-based routes with validation.

    controller?: ScannedController

    Extracted controller information including class and method details. Only present when using controller-based routes.