Skip to content

Commit 9f448d5

Browse files
authored
chore: doc, test, lint update (#105)
* updated docs to meet go-openapi standards * fixed discord link * updated dependencies * upgraded tests to use generic variant Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent 565d4a2 commit 9f448d5

File tree

14 files changed

+322
-164
lines changed

14 files changed

+322
-164
lines changed

.github/CONTRIBUTING.md

Lines changed: 78 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,57 @@
1-
## Contribution Guidelines
1+
You'll find here general guidelines to contribute to this project.
2+
They mostly correspond to standard practices for open source repositories.
23

3-
You'll find below general guidelines, which mostly correspond to standard practices for open sourced repositories.
4+
We have tried to keep things as simple as possible.
45

5-
>**TL;DR**
6-
>
7-
> If you're already an experienced go developer on github, then you should just feel at home with us
6+
> [!NOTE]
7+
> If you're an experienced go developer on github, then you should just feel at home with us
88
> and you may well skip the rest of this document.
99
>
10-
> You'll essentially find the usual guideline for a go library project on github.
10+
> You'll essentially apply the usual guidelines for a go library project on github.
11+
12+
These guidelines are common to all libraries published on github by the `go-openapi` organization,
13+
so you'll feel at home with any of our projects.
1114

12-
These guidelines are general to all libraries published on github by the `go-openapi` organization.
15+
You'll find more detailed (or repo-specific) instructions in the [maintainer's docs][maintainers-doc].
1316

14-
You'll find more detailed (or repo-specific) instructions in the [maintainer's docs](../docs).
17+
[maintainers-doc]: ../docs/MAINTAINERS.md
1518

16-
## How can I contribute?
19+
## How can I contribute
1720

18-
There are many ways in which you can contribute. Here are a few ideas:
21+
There are many ways in which you can contribute, not just code. Here are a few ideas:
1922

20-
* Reporting Issues / Bugs
21-
* Suggesting Improvements
22-
* Code
23-
* bug fixes and new features that are within the main project scope
24-
* improving test coverage
25-
* addressing code quality issues
26-
* Documentation
27-
* Art work that makes the project look great
23+
- Reporting issues or bugs
24+
- Suggesting improvements
25+
- Documentation
26+
- Art work that makes the project look great
27+
- Code
28+
- proposing bug fixes and new features that are within the main project scope
29+
- improving test coverage
30+
- addressing code quality issues
2831

2932
## Questions & issues
3033

31-
### Asking questions
34+
### Asking a question
35+
36+
You may inquire anything about this library by reporting a "Question" issue on github.
3237

33-
You may inquire about anything about this library by reporting a "Question" issue on github.
38+
You may also join our discord server where you may discuss issues or requests.
39+
40+
[![Discord Server][discord-badge]][discord-url]
41+
42+
[discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue
43+
[discord-url]: https://discord.gg/twZ9BwT3
3444

3545
### Reporting issues
3646

3747
Reporting a problem with our libraries _is_ a valuable contribution.
38-
3948
You can do this on the github issues page of this repository.
4049

4150
Please be as specific as possible when describing your issue.
4251

4352
Whenever relevant, please provide information about your environment (go version, OS).
4453

45-
Adding a code snippet to reproduce the issue is great, and as a big time saver for maintainers.
54+
Adding a code snippet to reproduce the issue is great, and a big time saver for maintainers.
4655

4756
### Triaging issues
4857

@@ -62,14 +71,16 @@ process them as fast as possible.
6271
Not sure if that typo is worth a pull request? Do it! We will appreciate it.
6372

6473
If your pull request is not accepted on the first try, don't be discouraged!
65-
If there's a problem with the implementation, hopefully you received feedback on what to improve.
74+
If there's a problem with the implementation, hopefully you've received feedback on what to improve.
6675

6776
If you have a lot of ideas or a lot of issues to solve, try to refrain a bit and post focused
6877
pull requests.
69-
Think that they must be reviewed by a maintainer and it is easy to lost track of things on big PRs.
78+
Think that they must be reviewed by a maintainer and it is easy to lose track of things on big PRs.
7079

7180
We're trying very hard to keep the go-openapi packages lean and focused.
72-
These packages constitute a toolkit: it won't do everything for everybody out of the box,
81+
82+
Together, these packages constitute a toolkit for go developers:
83+
it won't do everything for everybody out of the box,
7384
but everybody can use it to do just about everything related to OpenAPI.
7485

7586
This means that we might decide against incorporating a new feature.
@@ -80,9 +91,11 @@ However, there might be a way to implement that feature *on top of* our librarie
8091

8192
You just need a `go` compiler to be installed. No special tools are needed to work with our libraries.
8293

83-
The go compiler version required is always the old stable (latest minor go version - 1).
94+
The minimal go compiler version required is always the old stable (latest minor go version - 1).
95+
96+
Our libraries are designed and tested to work on `Linux`, `MacOS` and `Windows`.
8497

85-
If you're already used to work with `go` you should already have everything in place.
98+
If you're used to work with `go` you should already have everything in place.
8699

87100
Although not required, you'll be certainly more productive with a local installation of `golangci-lint`,
88101
the meta-linter our CI uses.
@@ -104,12 +117,12 @@ github will propose to open a pull request on the original repository.
104117

105118
Typically you'd follow some common naming conventions:
106119

107-
- if it's a bugfix branch, name it `fix/XXX-something`where XXX is the number of the
120+
- if it's a bug fixing branch, name it `fix/XXX-something` where XXX is the number of the
108121
issue on github
109122
- if it's a feature branch, create an enhancement issue to announce your
110123
intentions, and name it `feature/XXX-something` where XXX is the number of the issue.
111124

112-
> NOTE: we don't enforce naming conventions on branches: it's your fork after all.
125+
NOTE: we don't enforce naming conventions on branches: it's your fork after all.
113126

114127
#### Tests
115128

@@ -121,24 +134,24 @@ Take a look at existing tests for inspiration, and run the full test suite on yo
121134
before submitting a pull request.
122135

123136
Our CI measures test coverage and the test coverage of every patch.
137+
124138
Although not a blocking step - because there are so many special cases -
125139
this is an indicator that maintainers consider when approving a PR.
126-
127-
Please try your best to cover about 80% of your patch.
140+
Please try your best to cover at least 80% of your patch.
128141

129142
#### Code style
130143

131144
You may read our stance on code style [there](../docs/STYLE.md).
132145

133146
#### Documentation
134147

135-
Don't forget to update the documentation when creating or modifying features.
148+
Don't forget to update the documentation when creating or modifying a feature.
136149

137150
Most documentation for this library is directly found in code as comments for godoc.
138151

139-
The documentation for the go-openapi packages is published on the public go docs site:
152+
The documentation for this go-openapi package is published on [the public go docs site][go-doc].
140153

141-
<https://pkg.go.dev/github.com/go-openapi/jsonpointer>
154+
---
142155

143156
Check your documentation changes for clarity, concision, and correctness.
144157

@@ -150,11 +163,14 @@ go install golang.org/x/pkgsite/cmd/pkgsite@latest
150163
```
151164

152165
Then run on the repository folder:
166+
153167
```sh
154168
pkgsite .
155169
```
156170

157-
This wil run a godoc server locally where you may see the documentation generated from your local repository.
171+
This will run a godoc server locally where you may see the documentation generated from your local repository.
172+
173+
[go-doc]: https://pkg.go.dev/github.com/go-openapi/jsonpointer
158174

159175
#### Commit messages
160176

@@ -164,7 +180,7 @@ reference to all the issues that they address.
164180
Pull requests must not contain commits from other users or branches.
165181

166182
Commit messages are not required to follow the "conventional commit" rule, but it's certainly a good
167-
thing to follow this guidelinea (e.g. "fix: blah blah", "ci: did this", "feat: did that" ...).
183+
thing to follow that convention (e.g. "fix: fixed panic in XYZ", "ci: did this", "feat: did that" ...).
168184

169185
The title in your commit message is used directly to produce our release notes: try to keep them neat.
170186

@@ -186,7 +202,7 @@ Be sure to post a comment after pushing. The new commits will show up in the pul
186202
request automatically, but the reviewers will not be notified unless you comment.
187203

188204
Before the pull request is merged,
189-
**make sure that you squash your commits into logical units of work**
205+
**make sure that you've squashed your commits into logical units of work**
190206
using `git rebase -i` and `git push -f`.
191207

192208
After every commit the test suite should be passing.
@@ -195,6 +211,8 @@ Include documentation changes in the same commit so that a revert would remove a
195211

196212
#### Sign your work
197213

214+
Software is developed by real people.
215+
198216
The sign-off is a simple line at the end of your commit message,
199217
which certifies that you wrote it or otherwise have the right to
200218
pass it on as an open-source patch.
@@ -204,11 +222,30 @@ PGP-signed commit are greatly appreciated but not required.
204222

205223
The rules are pretty simple:
206224

207-
* read our [DCO](./DCO.md) (from [developercertificate.org](http://developercertificate.org/))
208-
* if you agree with these terms, then you just add a line to every git commit message
225+
- read our [DCO][dco-doc] (from [developercertificate.org][dco-source])
226+
- if you agree with these terms, then you just add a line to every git commit message
209227

210-
Signed-off-by: Joe Smith <joe@gmail.com>
228+
```
229+
Signed-off-by: Joe Smith <joe@gmail.com>
230+
```
211231

212232
using your real name (sorry, no pseudonyms or anonymous contributions.)
213233

214-
You can add the sign off when creating the git commit via `git commit -s`.
234+
You can add the sign-off when creating the git commit via `git commit -s`.
235+
236+
[dco-doc]: ./DCO.md
237+
[dco-source]: https://developercertificate.org
238+
239+
## Code contributions by AI agents
240+
241+
Our agentic friends are welcome to contribute!
242+
243+
We only have a few demands to keep-up with human maintainers.
244+
245+
1. Issues and PRs written or posted by agents should always mention the original (human) poster for reference
246+
2. We don't accept PRs attributed to agents. We don't want commits signed like "author: @claude.code".
247+
Agents or bots may coauthor commits, though.
248+
3. Security vulnerability reports by agents should always be reported privately and mention the original (human) poster
249+
(see also [Security Policy][security-doc]).
250+
251+
[security-doc]: ../SECURITY.md

.github/DCO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Developer's Certificate of Origin
1+
# Developer's Certificate of Origin
22

33
```
44
Developer Certificate of Origin

.github/wordlist.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
CodeFactor
2+
CodeQL
3+
DCO
4+
GoDoc
5+
JSON
6+
Maintainer's
7+
PR's
8+
PRs
9+
Repo
10+
SPDX
11+
TODOs
12+
Triaging
13+
UI
14+
XYZ
15+
agentic
16+
ci
17+
codebase
18+
codecov
19+
config
20+
dependabot
21+
dev
22+
developercertificate
23+
github
24+
godoc
25+
golang
26+
golangci
27+
jsonpointer
28+
linter's
29+
linters
30+
maintainer's
31+
md
32+
metalinter
33+
monorepo
34+
openapi
35+
prepended
36+
repos
37+
semver
38+
sexualized
39+
vuln

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
*.cov
33
.idea
44
.env
5+
.mcp.json
6+
.claude/

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ linters:
1212
- paralleltest
1313
- recvcheck
1414
- testpackage
15+
- thelper
1516
- tparallel
1617
- varnamelen
1718
- whitespace

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ include:
2323
Examples of unacceptable behavior by participants include:
2424

2525
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
2627
advances
28+
2729
* Trolling, insulting/derogatory comments, and personal or political attacks
2830
* Public or private harassment
2931
* Publishing others' private information, such as a physical or electronic
@@ -55,7 +57,7 @@ further defined and clarified by project maintainers.
5557
## Enforcement
5658

5759
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at ivan+abuse@flanders.co.nz. All
60+
reported by contacting the project team at <ivan+abuse@flanders.co.nz>. All
5961
complaints will be reviewed and investigated and will result in a response that
6062
is deemed necessary and appropriate to the circumstances. The project team is
6163
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,7 +70,7 @@ members of the project's leadership.
6870
## Attribution
6971

7072
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at [http://contributor-covenant.org/version/1/4][version]
73+
available at [<http://contributor-covenant.org/version/1/4>][version]
7274

7375
[homepage]: http://contributor-covenant.org
7476
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTORS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
| Username | All Time Contribution Count | All Commits |
1010
| --- | --- | --- |
11-
| @fredbi | 54 | https://github.com/go-openapi/jsonpointer/commits?author=fredbi |
12-
| @casualjim | 33 | https://github.com/go-openapi/jsonpointer/commits?author=casualjim |
13-
| @magodo | 3 | https://github.com/go-openapi/jsonpointer/commits?author=magodo |
14-
| @youyuanwu | 3 | https://github.com/go-openapi/jsonpointer/commits?author=youyuanwu |
15-
| @gaiaz-iusipov | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gaiaz-iusipov |
16-
| @gbjk | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gbjk |
17-
| @gordallott | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gordallott |
18-
| @ianlancetaylor | 1 | https://github.com/go-openapi/jsonpointer/commits?author=ianlancetaylor |
19-
| @mfleader | 1 | https://github.com/go-openapi/jsonpointer/commits?author=mfleader |
20-
| @Neo2308 | 1 | https://github.com/go-openapi/jsonpointer/commits?author=Neo2308 |
21-
| @olivierlemasle | 1 | https://github.com/go-openapi/jsonpointer/commits?author=olivierlemasle |
22-
| @testwill | 1 | https://github.com/go-openapi/jsonpointer/commits?author=testwill |
11+
| @fredbi | 54 | <https://github.com/go-openapi/jsonpointer/commits?author=fredbi> |
12+
| @casualjim | 33 | <https://github.com/go-openapi/jsonpointer/commits?author=casualjim> |
13+
| @magodo | 3 | <https://github.com/go-openapi/jsonpointer/commits?author=magodo> |
14+
| @youyuanwu | 3 | <https://github.com/go-openapi/jsonpointer/commits?author=youyuanwu> |
15+
| @gaiaz-iusipov | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=gaiaz-iusipov> |
16+
| @gbjk | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=gbjk> |
17+
| @gordallott | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=gordallott> |
18+
| @ianlancetaylor | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=ianlancetaylor> |
19+
| @mfleader | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=mfleader> |
20+
| @Neo2308 | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=Neo2308> |
21+
| @olivierlemasle | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=olivierlemasle> |
22+
| @testwill | 1 | <https://github.com/go-openapi/jsonpointer/commits?author=testwill> |
2323

2424
_this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,19 @@ Maintainers can cut a new release by either:
134134
<!-- Badges: release & docker images -->
135135
[release-badge]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer.svg
136136
[release-url]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer
137-
[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg
138-
[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer
139137
<!-- Badges: code quality -->
140138
[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/jsonpointer
141139
[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/jsonpointer
142140
[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/jsonpointer
143141
[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/jsonpointer
144142
<!-- Badges: documentation & support -->
145-
[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F
146-
[doc-url]: https://goswagger.io/go-openapi
147143
[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer
148144
[godoc-url]: http://pkg.go.dev/github.com/go-openapi/jsonpointer
149145
[slack-logo]: https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png
150146
[slack-badge]: https://img.shields.io/badge/slack-blue?link=https%3A%2F%2Fgoswagger.slack.com%2Farchives%2FC04R30YM
151147
[slack-url]: https://goswagger.slack.com/archives/C04R30YMU
152148
[discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue
153-
[discord-url]: https://discord.gg/DrafRmZx
149+
[discord-url]: https://discord.gg/twZ9BwT3
154150

155151
<!-- Badges: license & compliance -->
156152
[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg

0 commit comments

Comments
 (0)