# getSchemaFields

Collects route schema fields from ordered Path AST nodes.

## Signatures

```ts
export declare function getSchemaFields<const Parts extends ReadonlyArray<PathAst>>(parts: Parts): {
    requiredFields: [
        string,
        Schema.Top
    ][];
    optionalFields: [
        Schema.Record.Key,
        Schema.Top
    ][];
    queryParams: [
        string,
        {
            readonly requiredFields: Array<[
                string,
                Schema.Top
            ]>;
            readonly optionalFields: Array<[
                Schema.Record.Key,
                Schema.Top
            ]>;
        }
    ][];
};
```

## Why

Schema derivation remains inspectable before record construction.

## Ownership and lifetime

`getSchemaFields` walks the supplied ASTs immediately and returns fresh required/optional field arrays containing the discovered Schema references.
