Debian Codegraph @

.claude/rules/comments.md

raw
1 ---
2 paths:
3 - "**/*.go"
4 ---
5
6 # Comments for strfmt types
7
8 Formatted types (all types exported by this library, e.g. `DateTime`, `UUID`, ...) come
9 with a special annotation `swagger:strfmt [format]`.
10
11 These comments are significant and consumed by the `go-swagger`
12 to generate OpenAPI specifications from go source.
13
14 The comment must reside exactly on a single line, preferably as the last block of comment lines for this type.
15
16 The `swagger:strfmt` string must remain as-is.
17
18 The `[format]` string must be the name of the registered format (e.g. `date`, `date-time`, `uuid` etc.).
19
20 The comment line _may_ be terminated with a `.` to mark the end of the comment sentence (common comment linting rule).
21
22 ```go
23 // [MyFormattedType] ...
24 //
25 // swagger:strfmt [format].
26 type [MyFormattedType] ...
27 ```