All Versions
29
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 1

  • v0.16.0

    ๐Ÿ’ฅ Breaking

    • Bump dependencies and remove support for Elixir < 1.7
    • Raise exception when using a reserved keyword in attributes/1 macro
    • Removed JaSerializer generators in favor of documenting how to use with Phoenix generators.
  • v0.15.0

    ๐Ÿ”‹ Features

    • Add optional support for camelCase key format as recommended by JSON:API v1.1 - #316/#317
    • Make JaSerializer.TopLevel.Builder.normalize_includes/1 public - #323

    ๐Ÿ› Bug fixes

    • Allow accept header with quality param - #320
    • Include relationships in sparse field definition - #324

    ๐Ÿ’ฅ Breaking

    • Don't render empty relationships - #311
    • Omit prev/next links when current page is > last page - #317
    • Don't raise AssociationNotLoadedError if belongs to relationship can be determined. - #322

    โ†ช The following workaround is no longer needed:

    has_one :city, serializer: MyApp.CityView
    
    def city(%{city: %Ecto.Association.NotLoaded{}, city_id: nil}, _conn), do: nil
    def city(%{city: %Ecto.Association.NotLoaded{}, city_id: id}, _conn), do: %{id: id}
    def city(%{city: city}, _conn), do: city
    
  • v0.14.1

    ๐Ÿ› Bug fixes

    • Fix application start up w/out Poison - #310
  • v0.14.0

    ๐Ÿ’ฅ Breaking

    • Only include attributes key when there are attributes present - #297
    • Serializer attribute and relationship function overrides must be public. Previously there was an untested/undocumented way of overriding attributes with private functions, but this is no longer supported.

    In other words, change this:

    defmodule PostSerializer do
      use JaSerializer, dsl: true
      attributes [:html]
    
      defp html(post, _conn) do
        Earmark.to_html(post.body)
      end
    end
    

    to this:

    defmodule PostSerializer do
      use JaSerializer, dsl: true
      attributes [:html]
    
      def html(post, _conn) do
        Earmark.to_html(post.body)
      end
    end
    

    ๐Ÿ”‹ Features

    • Read key format config value at runtime - #265

    ๐Ÿ› Bug fixes

    • Build pagination URLs using base url and request path - #281
    • Issue rendering some ecto changeset errors - #275
    • Handle the case where the end of a link is a URI fragment - #293
    • Added missing @callback in Serializer - #294
    • Consistent relation override - #299
    • Fix compilation error when defining already inlined by compiler methods - #304

    Misc

    • Add .formatter.exs for consistent formatting
    • Fixed compiler warnings
    • Use capture_io in tests to make output less noisy
  • v0.13.0

    ๐Ÿ’ฅ Breaking

    • Add JaSerializer.Builder.PaginationLinks (@bcardarella) - #233
      • page_number_key defaults to number instead of page
      • page_size_key defaults to size instead of page-size
      • scrivener_base_url renamed to page_base_url

    ๐Ÿ”‹ Features

    • Allow serializing null structs (@juanazam) - #181
    • Preserve ID in to_attributes/1 (@xtian) - #254
    • Allow API to produce pluralized types rather than having to configure each serializer one by one (@bcardarella) - #225
    • Generator task for Phoenix 1.3 (@mikeni) - #243

    ๐Ÿ›  Bugfixes

    • Fixed formatting of multi-word relationship path keys (@yogipatel) - #230
    • Page links are merged in correct order (@qbart) - #251
    • Fix an edge case with pagination links (@marpo60) - #252

    ๐ŸŽ Performance

    • Improved performance of inline DSL attributes (@DocX) - #245

    ๐Ÿ“š Documentation

    • Fixes and improvements by @peterberkenbosch, @petehamilton, @beerlington
  • v0.12.0

    • ๐Ÿ’ฅ Breaking
      • Elixir 1.1 and earlier no longer supported.
    • ๐Ÿ”‹ Features
      • Elixir 1.4 support. (@yordis, @joshuataylor, @asummers)
      • Add config :ja_serializer, scrivener_base_url: support (@geolessel)
      • Support custom key deserialization (@vasilenko)
  • v0.11.2

    • ๐Ÿ”‹ Features
      • Allow customization of pagination params in Scrivener intergration (@scrogson)
    • ๐Ÿ›  Bugfixes
      • Add json api version to error responses. (@nmcalabroso)
      • Support umbrella apps in generators. (@gullitmiranda)
      • Support {:array, :integer} type ecto fields in error serializer (@henriquecf)
  • v0.11.1

    • ๐Ÿ›  Bugfixes
      • Handle port numbers in link urls. (@MishaConway)
    • ๐Ÿ“š Documentations
      • Fixes and improvements by @archSeer, @JoshSmith, and @rynam0
    • Misc
      • Cleaned up Credo reported code inconsistencies
  • v0.11.0

    • ๐Ÿ’ฅ Breaking
      • The results of JaSerializer.format/4 now returns maps consitently keyed with binaries instead of mixed binaries and atoms. This is not an issue when rendering to json, but any direct testing of format/4 calls may need to be updated. (@bcardarella)
    • ๐Ÿ›  Bugfixes
      • Ensure deep linked include query params are correctly rendered. (@KronicDeth)
      • Use build_conn/0 instead of conn/0 in Phoenix test generator (@dustinfarris)
      • Properly parse nill relationships when de-serializing params (@kaermorchen)
    • ๐Ÿ”‹ Features
      • adds :relationships to serialization opts to skip serializing relationships. Defaults to true. (@bcardarella)
      • Adds preload/3 hook for preloading relationship data.
      • Support passing more fields to EctoErrorSerializer (@nurugger07)
  • v0.10.1

    • ๐Ÿ”‹ Features
      • Upgrade Scrivener for Ecto 2.0 & Scrivener support (@avitex)
    • ๐Ÿ›  Bugfixes
      • Fix ecto error serialization for both 2.0 and 1.0 support (@KronicDeth)
    • ๐Ÿ—„ Deprecations
      • No longer supports Scrivener 1.x