You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+29-25Lines changed: 29 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,41 +4,45 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
Go implementation of [JSON Pointer (RFC 6901)](https://datatracker.ietf.org/doc/html/rfc6901) for navigating
8
-
and mutating JSON documents represented as Go values. Unlike most implementations, it works not only with
9
-
`map[string]any` and slices, but also with Go structs (resolved via `json` struct tags and reflection).
7
+
Go library for validating OpenAPI v2 (Swagger) specifications and JSON Schema draft 4 data.
8
+
It is part of the [go-openapi](https://github.com/go-openapi) ecosystem and used by [go-swagger](https://github.com/go-swagger/go-swagger).
9
+
10
+
The library provides two main capabilities:
11
+
1.**Spec validation** — validates a Swagger 2.0 spec document against the JSON meta-schema, plus extra semantic rules (path uniqueness, parameter consistency, $ref resolution, etc.)
12
+
2.**Schema validation** — validates arbitrary data against a JSON Schema draft 4 schema (tested against the official JSON-Schema-Test-Suite)
13
+
14
+
API is stable. This is legacy/maintenance code — deep refactoring is not worthwhile;
15
+
a ground-up replacement is the long-term plan.
10
16
11
17
See [docs/MAINTAINERS.md](../docs/MAINTAINERS.md) for CI/CD, release process, and repo structure details.
- Struct fields **must** have a `json` tag to be reachable; untagged fields are ignored
41
-
(differs from `encoding/json` which defaults to the Go field name).
42
-
- Anonymous embedded struct fields are traversed only if tagged.
43
-
- The RFC 6901 `"-"` array suffix (append) is **not** implemented.
47
+
The validator chain is built from `valueValidator` implementations (type, format, string, number, slice, object, common, schemaProps), assembled by `SchemaValidator`. Validators and results are pooled for performance (`pools.go`). The codebase has known complexity issues (many `//nolint:gocognit` deferrals) stemming from the original design.
0 commit comments