ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
56 stars 40 forks source link

Mark required belongs_to relationships as required in the json_schema #38

Closed zachdaniel closed 3 years ago

zachdaniel commented 3 years ago

This json object: https://github.com/ash-project/ash_json_api/blob/master/lib/ash_json_api/json_schema/json_schema.ex#L556 should have a required key (like attributes), which should be any relationship marked as required (only belongs_to relationships can be required at the moment). This only needs to be on post. For updates, the relationship will have already been set.