Properly adds meta and jsonapi

This commit is contained in:
Muhammad Nawzad 2023-11-12 11:28:53 +03:00
parent 2d7dd77f6e
commit 215c101c98
No known key found for this signature in database
GPG Key ID: B954B6AAE33940B2

View File

@ -31,10 +31,10 @@ module Schemable
@schema_modifier.add_properties(schema, included_schema, '.')
end
@schema_modifier.add_properties(schema, meta, '.') if collection
@schema_modifier.add_properties(schema, jsonapi, '.')
@schema_modifier.add_properties(schema, { meta: }, '.') if collection
@schema_modifier.add_properties(schema, { jsonapi: }, '.')
{ type: :object, properties: schema }
{ type: :object, properties: schema }.compact_blank
end
def meta