diff --git a/lib/api/decorators/schema.rb b/lib/api/decorators/schema.rb index 4f6d005f2c..a50050c509 100644 --- a/lib/api/decorators/schema.rb +++ b/lib/api/decorators/schema.rb @@ -66,7 +66,8 @@ module API name_source: property, href_callback:, required: true, - writable: true) + writable: true, + show_if: true) raise ArgumentError if property.nil? property property, @@ -83,7 +84,8 @@ module API end representer - } + }, + if: show_if end def schema_with_allowed_collection(property, @@ -93,7 +95,8 @@ module API value_representer:, link_factory:, required: true, - writable: true) + writable: true, + show_if: true) raise ArgumentError unless property property property, @@ -113,7 +116,8 @@ module API end representer - } + }, + if: show_if end def represented_class