Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contributing

## Field validation

Field constraints use standard [Buf Protovalidate annotations](buf/validate/validate.proto):

```proto
import "buf/validate/validate.proto";

// Inside a message:
string namespace = 1 [(buf.validate.field).required = true];
```

`required` rejects zero-valued ordinary proto3 scalars and empty lists/maps. Fields with explicit presence only require presence. Consuming applications enforce the annotations with Protovalidate. The upstream schema is vendored alongside the Google and Nexus dependencies and pinned in `buf.lock`.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Install as git submodule to the project.

## Contribution

See [CONTRIBUTING.md](CONTRIBUTING.md) for field validation guidance.

Make your change to the temporal/proto files, and run `make` to update the openapi definitions.
Rust is also required because `make` installs and runs `nex-gen` when regenerating system Nexus WIT files.

Expand Down
3 changes: 3 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 435963d1631043e694e56e6bcc3c79c3
digest: b5:f4ea07ad2dd94bd7243562f9908b9fb104feef8076040c89d9f7c1dedc074de4d4ce2b997686ef4400f3eccb765a7cfc20ed4acdd70b9a3699351245c61dba97
- name: buf.build/googleapis/googleapis
commit: 004180b77378443887d3b55cabc00384
digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc
Expand Down
2 changes: 2 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ modules:
# Vendored for api-linter (can't read the BSR); excluded so buf sees them once.
- google
- nexusannotations
- buf
deps:
- buf.build/bufbuild/protovalidate
- buf.build/googleapis/googleapis
- buf.build/temporalio/nexus-annotations
lint:
Expand Down
Loading
Loading