AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
839 stars 315 forks source link

Add Language and Site serializers #2900

Closed tvdeyen closed 4 months ago

tvdeyen commented 4 months ago

What is this pull request for?

Without those ActiveModelSerializers can't find a serializer for the site and language relations in the PageSerializer which is used in the PageSelect. It delegates serialization to Rails which takes whatever serializer is responsible for to_json, which in some cases lead to nesting the site or language with it's own root key, which is not what we want.

Checklist

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.96%. Comparing base (98293af) to head (1447087).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2900 +/- ## ======================================= Coverage 95.96% 95.96% ======================================= Files 230 232 +2 Lines 6269 6275 +6 ======================================= + Hits 6016 6022 +6 Misses 253 253 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.