be aware that namespaces should match the folder structure:
# should be in app/controllers/api/v1/posts_controller.rb
module Api
module V1
class PostsController < ApiController
# should be in app/serializers/post_serializer.rb
class PostSerializer < ActiveModel::Serializer
when using PostSerializer
without a prefix, the current namespace is assumed. if you are referencing the global namespace use ::PostSerializer