Skip to content

Commit 4c92c45

Browse files
authored
Adds expected_type to IntegerValidator example (#769)
Otherwise, the generated docs.json outputs the field as a `string` and not a `number`
1 parent 1a4855a commit 4c92c45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,10 @@ So we create apipie_validators.rb initializer with this content:
13681368
def description
13691369
"Must be #{@type}."
13701370
end
1371+
1372+
def expected_type
1373+
'numeric'
1374+
end
13711375
end
13721376
13731377
Parameters of the build method:

0 commit comments

Comments
 (0)