Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Language and Site serializers #2900

Merged
merged 1 commit into from
May 28, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented May 28, 2024

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

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen added this to the 7.2 milestone May 28, 2024
@tvdeyen tvdeyen requested a review from a team as a code owner May 28, 2024 11:38
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.
@tvdeyen tvdeyen force-pushed the add-site-and-language-serializers branch from 3c412fd to 1447087 Compare May 28, 2024 11:47
Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tvdeyen tvdeyen merged commit 83c4892 into AlchemyCMS:main May 28, 2024
36 checks passed
@tvdeyen tvdeyen deleted the add-site-and-language-serializers branch May 28, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants