---
meta:
 - name: keywords
   description: api typescript node.js documentation JsonHeaders interface
---
# JsonHeaders - @tsed/schema

## Usage

```typescript
import { JsonHeaders } from "@tsed/schema";
```

> See [/packages/specs/schema/src/interfaces/JsonOpenSpec.ts](https://github.com/tsedio/tsed/blob/v8.28.0/packages/specs/schema/src/interfaces/JsonOpenSpec.ts#L0-L0).

## Overview

```ts
interface JsonHeaders {
    [key: string]: number | string | (JsonHeader & {
        type?: string;
        value?: string | number;
    });
}
```

<!-- Description -->

## Description

Collection of HTTP headers for OpenAPI operations.

Headers can be defined as simple values (number or string) or as detailed header
objects with schema information. This flexible structure supports both quick
header definitions and comprehensive OpenAPI header specifications.

### Usage

```typescript
const headers: JsonHeaders = {
  // Simple header value
  "X-Rate-Limit": 100,

  // Detailed header with schema
  "X-Request-ID": {
    description: "Unique request identifier",
    type: "string",
    value: "abc-123"
  }
};
```

<!-- Members -->

## \[key: string]: number | string |

```ts
[key: string]: number | string | (JsonHeader & {
     type?: string;
     value?: string | number;
 });
```
