lib/schemable/definition.rb in schemable-1.0.1 vs lib/schemable/definition.rb in schemable-1.0.2
- old
+ new
@@ -123,9 +123,21 @@
# @return [Array<Symbol>] The attributes that are nullable in the request/response body.
def nullable_attributes
%i[]
end
+ # Returns the relationships that are nullable in the response body.
+ # This means that they can be present in the response body but they can be null.
+ # They are not required to be present in the request body.
+ #
+ # @example
+ # ['users', 'applicant']
+ #
+ # @return [Array<String>] The attributes that are nullable in the response body.
+ def nullable_relationships
+ %w[]
+ end
+
# Returns the additional create request attributes that are not automatically generated.
# These attributes are appended to the create request schema.
#
# @example
# { name: { type: :string } }