# uuid/v1 — UUID validate, parse, generate

Validates, parses, and generates UUIDs, using
[`github.com/google/uuid`](https://github.com/google/uuid).

### `POST /v1/uuid/validate`

**Request**

```json
{ "value": "550e8400-e29b-41d4-a716-446655440000" }
```

**Response**

```json
{
  "value": "550e8400-e29b-41d4-a716-446655440000",
  "valid": true,
  "version": 4,
  "variant": "RFC4122"
}
```

Accepts the canonical 8-4-4-4-12 hyphenated form, with or without
surrounding braces, case-insensitively; `value` in the response is always
the normalized lowercase form. `version` and `variant` are omitted when
`valid` is `false` — an invalid UUID has no version/variant to report, and
`value` then echoes the input exactly as given.

### `POST /v1/uuid/generate`

**Request**

```json
{ "count": 3 }
```

`count` (optional, default 1, max 1000).

**Response**

```json
{ "values": ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "..."] }
```

Always version 4 (random), generated from `crypto/rand`-backed entropy via
`uuid.NewRandom`.

**Error response**

```json
{ "error": "count must be <= 1000, got 5000" }
```

## Notes

- UUIDs are identifiers, not a security or encryption mechanism — a
  correctly-formatted UUID says nothing about the authenticity of whatever
  it's naming.

## Out of scope

ULID and UUIDv7 (timestamp-based) generation and timestamp extraction —
ask if you need one added.

## Files

- `uuid.go` — module wiring (routes, HTTP handlers)
- `ops.go` — pure validate/generate logic
- `ops_test.go` — known-vector and error tests
