Abstract documentation examples into a generator in Serializer class to DRY up code