# info-defined

Source: https://apigenie.pl/docs/linter/asyncapi/rules/info-defined

This rule checks whether the info object of an AsyncAPI document provides a
description and a version.

## Rule Details

The info object is the first thing readers of an API see. Besides the
mandatory title, it should explain what the application does and which
version of the API is being described.

The `info-defined` rule reports:

- `Info description is missing or empty` when `info.description` is missing
  or empty,
- `Info version is empty` when `info.version` is an empty string.

The title is required by the AsyncAPI specification itself and is not checked
by this rule.

## Configuration

None.

## Examples

**Good**.

```yaml
asyncapi: 3.0.0
info:
  title: Pet Events
  version: 1.0.0
  description: Events published when pets are adopted, returned or updated.
```

**Bad**. The document does not explain what the application does, and its
version is empty.

```yaml
asyncapi: 3.0.0
info:
  title: Pet Events
  version: ""
```

## When Not to Use It

We recommend to always enable this rule.

## Compatibility

This rule is compatible with AsyncAPI 3.x documents. AsyncAPI 2.x documents
are rejected by the reader and are not linted.
