Hi Maryna! REST as you mentioned doesn't really enforce a specification.
Technically any JSON library is fine as it's not inherent about the format.
We use the gem JSON:API at Forem, but for internal serialization mostly, the public API doesn't follow the JSON API standard, we use a combination of .to_json and JBuilder to render it. We also use Oj as the backend serializer.
My recommendation is to document your API with OpenAPI 3. I know there are tools to help with it in Rails, but I haven't tried any.
Thank you so much for sharing this information!
I like using Oj gem in my projects as well.
I will go ahead with not following JSON:API standard for my public API.
I was thinking of using OpenAPI 3 for my documentation in future, so thanks for sharing cool articles with me 😄
I wasn't sure if there are any gems that support OpenAPI v3 yet, but I see the article is listing some GUI tools, so will check out those as well.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Maryna! REST as you mentioned doesn't really enforce a specification.
Technically any JSON library is fine as it's not inherent about the format.
We use the gem
JSON:API
at Forem, but for internal serialization mostly, the public API doesn't follow the JSON API standard, we use a combination of.to_json
andJBuilder
to render it. We also use Oj as the backend serializer.My recommendation is to document your API with OpenAPI 3. I know there are tools to help with it in Rails, but I haven't tried any.
I'd like to explore Design First APIs in the future.
Thank you so much for sharing this information!
I like using
Oj
gem in my projects as well.I will go ahead with not following
JSON:API
standard for my public API.I was thinking of using
OpenAPI 3
for my documentation in future, so thanks for sharing cool articles with me 😄I wasn't sure if there are any gems that support OpenAPI v3 yet, but I see the article is listing some GUI tools, so will check out those as well.