Skip to content

Commit 840ee94

Browse files
feat: ensure internal/apiform encoder can handle "force_encode" serialization tag
1 parent fd145c4 commit 840ee94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/apiform/tag.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type parsedStructTag struct {
1818
// otherwise this flag will have no effect
1919
// NOTE: won't work if update behavior is 'patch'
2020
forceEncode bool
21+
// Don't skip this value, even if it's computed (no-op for computed optional fields)
22+
// If encodeStateForUnknown is set on a computed field, this flag should also be set;
23+
// otherwise this flag will have no effect
24+
// NOTE: won't work if update behavior is 'patch'
2125
}
2226

2327
func parseFormStructTag(field reflect.StructField) (tag parsedStructTag, ok bool) {

0 commit comments

Comments
 (0)