Open jaswinder97 opened 7 years ago
For has_many association we can give array type for nested attributes as:
property :examples_attributes, :array, :required, "A list of examples", { "items" => { "$ref" => "Example" } }
But how add nested attributes for single record if we consider has_one association. I tried by specifying hash type but it didn't work.
property :example_attributes, :hash, :required, "An example", { "item" => { "$ref" => "Example" } }
property :example_attributes, :'Example', :required, 'Some description'
For has_many association we can give array type for nested attributes as:
property :examples_attributes, :array, :required, "A list of examples", { "items" => { "$ref" => "Example" } }
But how add nested attributes for single record if we consider has_one association. I tried by specifying hash type but it didn't work.
property :example_attributes, :hash, :required, "An example", { "item" => { "$ref" => "Example" } }