Skip to content

Commit 8fd45b7

Browse files
committed
Rename SkipDefaultOptionValues to SkipNonRequiredDefaultValues
1 parent 25f4705 commit 8fd45b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/bootstrapped/test/src/smithy4s/DocumentSpec.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class DocumentSpec() extends FunSuite {
541541
"document encoder - FieldFilter.SkipEmptyOptionals and keep defaults"
542542
) {
543543
val result = Document.Encoder
544-
.withFieldFilter(FieldFilter.SkipDefaultOptionValues)
544+
.withFieldFilter(FieldFilter.SkipNonRequiredDefaultValues)
545545
.fromSchema(DefaultNullsOperationOutput.schema)
546546
.encode(DefaultNullsOperationOutput())
547547

modules/core/src/smithy4s/schema/FieldFilter.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ object FieldFilter {
147147
}
148148
}
149149

150-
private case object skipDefaultOptionValues
150+
private case object skipNonRequiredDefaultValues
151151
extends FieldFilter.SkipNonRequired {
152152
def compileNonRequired[S, A](field: Field[S, A]): Predicate[A] = {
153153
// do not use field.hasDefaultValue as it returns always true for options
@@ -159,7 +159,7 @@ object FieldFilter {
159159
}
160160
}
161161

162-
val SkipDefaultOptionValues: FieldFilter = skipDefaultOptionValues
162+
val SkipNonRequiredDefaultValues: FieldFilter = skipNonRequiredDefaultValues
163163

164164
private case object skipUnsetOptions extends FieldFilter.SkipNonRequired {
165165
def compileNonRequired[S, A](field: Field[S, A]): Predicate[A] = { a =>
@@ -169,5 +169,5 @@ object FieldFilter {
169169

170170
val SkipUnsetOptions: FieldFilter = skipUnsetOptions
171171

172-
val Default = SkipUnsetOptions && SkipDefaultOptionValues
172+
val Default = SkipUnsetOptions && SkipNonRequiredDefaultValues
173173
}

0 commit comments

Comments
 (0)