You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default blueprint json file generated from mix.
defmoduleMyApp.PostJSONdo@doc""" Renders a list of posts. """defindex(%{posts: posts})do%{data: for(post<-posts,do: data(post))}end@doc""" Renders a single post. """defshow(%{post: post})do%{data: data(post)}enddefpdata(%Post{}=post)do%{id: post,text: post.text}endend
The text was updated successfully, but these errors were encountered:
snewcomer
changed the title
New docs for
New docs for json views in Phoenix
Oct 16, 2024
Do we need new docs? Sry its been a while since I've looked at Phoenix, but with this new paradigm, it seems like we would make use of the Serializer?
https://hexdocs.pm/phoenix/json_and_apis.html
The usage docs
The default blueprint json file generated from
mix
.The text was updated successfully, but these errors were encountered: