Skip to content

JSON Schema profile follow-ups: store/forms vocabularies, OpenAPI export, shared HTTP+MCP+form schema, formats, workerd CI #861

Closed

Description

@jimhoyd

Follow-ups from the first #845 deliverable (#860). In that PR, request.body.schema became a bounded JSON Schema 2020-12 profile validated by Ajv. Each item below is observed and not yet designed.

  1. Private vocabularies remain. The store and forms schema vocabularies are still URLCode's own. Decide whether to move them onto the profile or onto Standard Schema at trusted boundaries.
  2. No OpenAPI 3.1 export. Needed: export plus independent validation of the output, a generated client, and one contract-testing run.
  3. One source schema across HTTP, MCP and forms. MCP input and output schemas now share the profile, but a single source schema does not yet inform HTTP, a declared MCP operation and a form. SDK-provided validators are not yet evaluated.
  4. 422 reports only the first failure. This is intentional (allErrors: false on untrusted input). Multi-issue feedback would need a bounded design.
  5. Body rules are per route. request.body.required is per route, so GET and POST on one path cannot have different body rules.
  6. Only format: uuid. Formats such as email and date-time need a format library (for example ajv-formats) and a decision.
  7. workerd parity is manual. The run is off CI, needs the network, and has only been run on macOS arm64.
  8. Ajv strict-mode refusals are raw. They surface as a truncated "refused by the JSON Schema 2020-12 validator" message rather than the profile's pointer diagnostics.
  9. Unsupported: response schemas and default application.

Related: #845, #841.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions