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

fix: Match shape for definitions and schemas when generating a json schema #75

Closed skanderm closed 1 year ago

skanderm commented 1 year ago

Fixes a regression for displaying the json_api schema with multiple APIs. Otherwise runs into an error when generating the schema.

** (BadMapError) expected a map, got: {%{"error" => ...}, []}
    (ash_json_api 0.31.1) deps/ash_json_api/lib/ash_json_api/json_schema/json_schema.ex:24: anonymous fn/2 in AshJsonApi.JsonSchema.generate/1

Please let me know if you need anything more!

zachdaniel commented 1 year ago

🚀 Thank you for your contribution! 🚀