# schemaFromFields

Builds an Effect Schema record from required and optional route fields.

## Signatures

```ts
export declare function schemaFromFields({ requiredFields, optionalFields }: SchemaFields): Schema.Top;
```

## Why

All route-derived records apply the same required/optional construction rules.

## Ownership and lifetime

`schemaFromFields` constructs and returns immutable Effect Schema values immediately. Any services are required later by the Effect that executes those Schemas.
