@myronsi/messenger-api 2.0.0-alpha.1.next.1 → 2.0.0-alpha.1.next.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -45,14 +45,13 @@ Change the contract first, in the same PR as the code that implements it. Bump `
45
45
 
46
46
  ## Go server
47
47
 
48
- The Go server code is generated from `openapi.yaml` with [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) (strict server) in the same PR as a contract change. The configuration is `oapi-codegen.yaml`; the generator was verified with oapi-codegen v2.8.0 (Go 1.25) against this document. Add this directive to the Go module and commit the generated file:
48
+ The Go server code is generated from `openapi.yaml` with [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) (strict server) in the same PR as a contract change. The configuration is `oapi-codegen.yaml`, the output is `internal/httpapi/api.gen.go`, and the `go:generate` directive lives in `internal/httpapi/generate.go`:
49
49
 
50
- ```go
51
- //go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.8.0 -config api/oapi-codegen.yaml api/openapi.yaml
50
+ ```sh
51
+ make generate # go generate ./...
52
52
  ```
53
53
 
54
- As soon as the repository has a `go.mod`, CI runs `go generate ./... && git diff --exit-code`.
55
-
54
+ When an operation is added to the contract, the build fails until it is added to `internal/httpapi/unimplemented.go` (which answers 501) or to a real implementation. CI runs `go generate ./... && git diff --exit-code`, so a stale generated file fails the build.
56
55
  ## Publishing
57
56
 
58
- See `docs/releasing.md`: `next` on every merge to `master` that changes `api/`, the stable version after a backend release when `info.version` is not on npm yet. Both use `npm publish --provenance`.
57
+ See `docs/releasing.md`: `next` on every merge to `master` that changes `api/`, the stable version after a backend release when `info.version` is not on npm yet. Both use `npm publish` with Trusted Publishing, which also attaches provenance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myronsi/messenger-api",
3
- "version": "2.0.0-alpha.1.next.1",
3
+ "version": "2.0.0-alpha.1.next.31",
4
4
  "description": "API contract of the Messenger backend: OpenAPI document, WebSocket event schemas and generated TypeScript types",
5
5
  "license": "MIT",
6
6
  "repository": {