# DiscoveryEntry

One resource this API exposes: where it lives, what it is called in the permission system, which schemas describe it and which operations it registers.

## Used by
- GET /api/v2/: List the resources this API exposes (DiscoveryEntryList)

## DiscoveryEntry fields
- name (string, required): Human-readable name of the resource collection.
- path (string or null, required): Absolute URL of the collection endpoint, or `null` where this resource registers no flat collection and is reached only through a parent or by id.
- item_path (string or null, required): Templated absolute URL of the single-resource endpoint, with the path parameter left as a `{placeholder}`. Null where the resource has no flat route at all.
- permission_prefix (string, required): The permission prefix this resource is gated on. It is the value after the class in an `api:{class}:{prefix}` token ability.
- summary_schema (string, required): JSON pointer to the OpenAPI component describing this resource in the `summary` view, which is what a collection returns by default.
- detail_schema (string, required): JSON pointer to the OpenAPI component describing the `detail` view, which is what a single-resource read and every write return.
- operations (array of string, required): The operations this resource registers, as `index`, `store`, `show`, `update`, `destroy` and `actions.{verb}`. A nested operation keeps its full identifier, so `work-items.comments.index` appears verbatim.

## Variants

### DiscoveryEntryList

What a collection returns, and what `?view=summary` returns on a single record.

7 fields.
Identical to the detail object above.

## Example
```json
{
  "name": "…",
  "path": "…",
  "item_path": "…",
  "permission_prefix": "…",
  "summary_schema": "…",
  "detail_schema": "…",
  "operations": [
    "…"
  ]
}
```
