# Fix: Referenced JSON Schemas resolve as application/schema+json

> Web-audit fix skill for the `json-schemas` check (API, MAY).

## Goal

Serve the JSON Schemas your API references so agents can validate payloads pre-flight.

## Fix

Serve the input and output JSON Schemas your API references (for example
`/api/schema/input.json`) as `application/schema+json`. Agents validate payloads against them
before calling, which turns a class of runtime failures into pre-flight validation.

## Resources

- [JSON Schema](https://json-schema.org/specification)

## Copy-paste prompt

Paste this into your coding agent. [Your audit](https://anc.dev/audit) adds what it observed for this check:

```text
Goal: Serve the JSON Schemas your API references so agents can validate payloads pre-flight
Fix: Serve the input and output JSON Schemas your API references (for example `/api/schema/input.json`) as `application/schema+json`. Agents validate payloads against them before calling, which turns a class of runtime failures into pre-flight validation.
Skill: https://anc.dev/fix/json-schemas
Docs: https://json-schema.org/specification
```

## Verify

Re-run the audit at [https://anc.dev/audit](https://anc.dev/audit) or call the `audit_website` MCP tool; the `json-schemas` check should report `pass`.
