Skip to content

Commit

Permalink
docs: add Null to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfaust committed Oct 18, 2018
1 parent 2163b2c commit 242027b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ struct MyParams
# Therefore, "additional_data", "AdditionalData", "additionalData" and "additional-data" is OK
additional_data: {
email: String,
bio: String | Nil, # Alternative syntax for nilable params
tags: Array(String), # Arrays are supported too
# This param can have explicit Null value
# i.e. "null" string for query-like params
# and `null` value for JSON.
bio: Union(String | Nil | Null),
tags: Array(String), # Arrays are supported too

# Nesting is possible with ∞ levels
deep: {
Expand Down
7 changes: 5 additions & 2 deletions src/params.cr
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ module Params
# #
# # So, "the_email", "TheEmail", "theEmail" and "the-email" is expected for this param
# the_email: String,
# bio: String | Nil, # Alternative syntax for nilable params
# tags: Array(String), # Arrays are supported too
# # This param can have explicit Null value
# # i.e. "null" string for query-like params
# # and `null` value for JSON.
# bio: Union(String | Nil | Null),
# tags: Array(String), # Arrays are supported too
#
# # Nesting is possible with ∞ levels
# deep: {
Expand Down

0 comments on commit 242027b

Please sign in to comment.