## Documentation index

This index lists every available documentation page and its Markdown source.

- [About VDL](https://vdl.varavel.com/docs/about/index.md)
- [Guides](https://vdl.varavel.com/docs/guides/index.md)
  - [Installation](https://vdl.varavel.com/docs/guides/installation/index.md)
  - [CLI Commands](https://vdl.varavel.com/docs/guides/cli/index.md)
  - [Editor Integration](https://vdl.varavel.com/docs/guides/editors/index.md)
  - [Project Configuration](https://vdl.varavel.com/docs/guides/configuration/index.md)
  - [Creating Plugins](https://vdl.varavel.com/docs/guides/creating-plugins/index.md)
- [Language](https://vdl.varavel.com/docs/language/index.md)
  - [Start Here](https://vdl.varavel.com/docs/language/start-here/index.md)
  - [Files and Comments](https://vdl.varavel.com/docs/language/files/index.md)
  - [Includes](https://vdl.varavel.com/docs/language/includes/index.md)
  - [Docstrings](https://vdl.varavel.com/docs/language/docstrings/index.md)
  - [Types](https://vdl.varavel.com/docs/language/types/index.md)
  - [Field Types](https://vdl.varavel.com/docs/language/field-types/index.md)
  - [Enums](https://vdl.varavel.com/docs/language/enums/index.md)
  - [Constants and Literals](https://vdl.varavel.com/docs/language/constants/index.md)
  - [Annotations](https://vdl.varavel.com/docs/language/annotations/index.md)
  - [Spreads and References](https://vdl.varavel.com/docs/language/spreads-references/index.md)
  - [Naming and Validation](https://vdl.varavel.com/docs/language/naming-validation/index.md)
- [VDL Plugin Protocols](https://vdl.varavel.com/docs/protocols/index.md)
  - [Introduction](https://vdl.varavel.com/docs/protocols/introduction/index.md)
  - [VPP-0: Core](https://vdl.varavel.com/docs/protocols/core/index.md)
  - [VPP-1: Deprecations](https://vdl.varavel.com/docs/protocols/deprecations/index.md)
  - [VPP-2: HTTP-RPC](https://vdl.varavel.com/docs/protocols/http-rpc/index.md)
  - [VPP-3: Policy](https://vdl.varavel.com/docs/protocols/policy/index.md)
  - [VPP-4: Events](https://vdl.varavel.com/docs/protocols/events/index.md)
- [Reference](https://vdl.varavel.com/docs/reference/index.md)
  - [Language Specification](https://vdl.varavel.com/docs/reference/spec/index.md)
  - [Formatting Guide](https://vdl.varavel.com/docs/reference/formatting-guide/index.md)


## Documentation content

The documentation for the current page follows, reproduced verbatim.


## What Annotations Are

Annotations attach metadata to schema nodes.

```vdl
@deprecated
type OldUser {
  id string
}
```

The VDL core does not hardcode most domain behavior. Plugins read annotations and decide what they mean.

For example, one plugin may interpret `@event`, another may interpret `@httpRpc`, and another may interpret `@deprecated`.

## Basic Syntax

An annotation starts with `@` and a name.

```vdl
@internal
type InternalUser {
  id string
}
```

Annotations can also have one argument.

```vdl
@deprecated("Use NewUser instead.")
type OldUser {
  id string
}
```

The argument must be a data literal: string, number, boolean, object, array, constant reference, or enum member reference.

## Multiple Annotations

You can stack annotations.

```vdl
@internal
@owner("platform")
type InternalConfig {
  name string
}
```

Annotations attach to the declaration or member that immediately follows them.

## Declaration Annotations

Annotations can be attached to `type`, `enum`, and `const` declarations.

```vdl
@event("users.created.{userId}")
type UserCreated {
  userId string
  email string
}

@stable
enum Region {
  Europe = "eu"
  America = "us"
}

@config
const serviceName = "billing"
```

## Field Annotations

Fields can have annotations.

```vdl
type User {
  @id
  id string

  @deprecated("Use displayName instead.")
  name? string

  displayName string
}
```

## Enum Member Annotations

Enum members can have annotations.

```vdl
enum Plan {
  Free = "free"

  @deprecated("Use Team instead.")
  Startup = "startup"

  Team = "team"
}
```

## Object Arguments

Object arguments are useful for structured metadata.

```vdl
@meta({ owner "platform" tier "gold" })
type Account {
  id string
}
```

Object entries use VDL literal syntax: key followed by value, no colon, no comma.

## Array Arguments

```vdl
@tags(["public" "billing" "stable"])
type Invoice {
  id string
}
```

Array literal items must be the same kind.

## Annotation Names

Annotation names should use `camelCase`.

```vdl
@generateClient
type PublicApi {
  name string
}
```

Avoid underscores or PascalCase annotation names.

## Annotations Are Plugin Contracts

An annotation has no effect unless some tool or plugin understands it.

This is a feature. It lets teams create domain-specific contracts without changing the VDL grammar.

Examples:

- `@httpRpc` can mark a type as an HTTP-RPC service.
- `@proc` can mark a request/response RPC operation.
- `@event("subject.{field}")` can mark an event payload and routing subject.
- `@deprecated` can mark generated code or schema output as deprecated.

Always check the plugin documentation for the annotations it supports.
