@myronsi/messenger-api 2.0.0-alpha.1.next.29 → 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.
- package/README.md +4 -5
- 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
|
|
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
|
-
```
|
|
51
|
-
|
|
50
|
+
```sh
|
|
51
|
+
make generate # go generate ./...
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
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
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.
|
|
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": {
|