internal/mcp/protocol: spell "Id" idiomatically

Enhance the generator so that it recognizes initialisms like "Id" and
writes them in all caps, as is idiomatic for Go.

Also, fix the import path of jsonschema in the generated code.

Change-Id: Ib12e9fbd543d360035d5e324f0aefca584ac7c85
Reviewed-on: https://go-review.googlesource.com/c/tools/+/670916
Auto-Submit: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Jonathan Amsterdam 2025-05-08 07:09:48 -04:00 • committed by Gopher Robot
commit 5bcbf820f2

View file

@ -62,7 +62,7 @@ type CancelledParams struct {
//
// This MUST correspond to the ID of a request previously issued in the same
// direction.
RequestId any `json:"requestId"`
RequestID any `json:"requestId"`
}
// Capabilities a client may support. Known capabilities are defined here, in