Skip to content

Commit 1b08bd2

Browse files
committed
chore: format
1 parent 50f02ee commit 1b08bd2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/content/blog/2025-12-19-go-further-with-open-payments.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "Go Further with Open Payments"
3-
description: "Announcing the Open Payments Go SDK"
2+
title: 'Go Further with Open Payments'
3+
description: 'Announcing the Open Payments Go SDK'
44
date: 2025-12-19
55
slug: go-further-with-open-payments
66
authors:
@@ -156,6 +156,7 @@ Each Open Payments resource has a dedicated service with methods that map direct
156156
One challenge we faced was that the upstream OpenAPI specifications didn't always produce ideal Go types when run through code generators. For example, request bodies for grants and outgoing payments used `oneOf` unions that resulted in awkward generated type names like `PostRequestJSONBody`.
157157

158158
To solve this, we leveraged [OpenAPI Overlays](https://learn.openapis.org/overlay/) — a powerful technique for modifying OpenAPI specs without forking them. Our overlay files (`authserver.overlay.yaml`, `resourceserver.overlay.yaml`) add explicit type names and restructure unions for better Go ergonomics:
159+
159160
```yaml
160161
# resourceserver.overlay.yaml
161162
actions:
@@ -166,7 +167,7 @@ actions:
166167
required: [walletAddress, quoteId]
167168
properties:
168169
walletAddress:
169-
$ref: "#/components/schemas/walletAddress"
170+
$ref: '#/components/schemas/walletAddress'
170171
quoteId:
171172
type: string
172173
metadata:
@@ -180,6 +181,7 @@ actions:
180181
```
181182

182183
Instead of wrestling with anonymous types, you get clear, self-documenting structs:
184+
183185
```go
184186
// Without overlays: confusing generated names
185187
var payload PostRequestJSONBody // What is this?

0 commit comments

Comments
 (0)