niccolox

niccolox

hello

last couple of days I have been exploring the ash_json_api_wrapper in a ecommerce store app I am building and I looking for feedback on the design and intent of this library

I see its experimental, and has no docs, and I think I have an ok working knowledge of it, I added an array type and a description type, the later I think its a kludge.

I am working against the Ecommerce API 3.0 from API Deck which based on a quick search seems reasonable Ecommerce API - Apideck

questions:

  1. anyone else using ash_json_api_wrapper in research or development or production?
  2. is the intent to be a way to interact with a JSON API endpoint? i.e. generate a Resource based on an JSON API and then interact with that API sending and receiving?
  3. how should I handle schemas that dont have endpoints? i.e. components.schemas.EcommerceOrderLineItem doesnt have a path in the Ecommerce API?

https://github.com/Devekko-Dev/devekko.store/blob/d10eb1919909feff1e1b8bbc0e2664699a54de45/store/lib/mix/ecommerce_api.ex#L26

my goal is to use the Ecommerce API from API Deck to build Ash Resources Domains JSON and GraphSQL and then integrate this with Next JS Commerce app in the same repo

the data in my Ash Ecommerce store than can be synced via API Deck into other platforms such as Shopify etc

Showing Posts 1 to 6

zachdaniel

zachdaniel

Creator of Ash
  1. I’ve only experimented with it, but I’d love to see it stretch its wings, and as soon as I have need of it I’ll be pushing its limits again.
  2. Yep! Thats right.
  3. If they don’t have endpoints then you are likely looking for embedded resources, the :map type, or a fully custom type.
niccolox

niccolox OP

Ok. Wrangling json schemas is not my favorite thing but if it can become a richer tool it can be a very powerful tool to build an integration project

niccolox

niccolox OP

followup

whats "entity_path \"#{config[:entity_path]}\"" in relation to the OpenAPI JSON spec?

zachdaniel

zachdaniel

Creator of Ash

It’s been a while since I’ve looked at that code but IIRC that is the path in the response that the resource in question can be found. like if you got a response like %{data: [%{"id" => 1}, %{"id" => 2}]} then entity_path would be something like data.

niccolox

niccolox OP

pushed some notes to my blog

niccolox

niccolox OP

splitting out the ash_json_gen_ecommerce_api to accompany my fork of ash_json_api_wrapper

my idea is to make an easily installable ash json gen package that consume the Ecommerce API and creates a Resource.

I have a closed sourced proprietary app which I want to use these apps in also

soon I want to expand

these are all personal self-funded projects, huge time constraints, so bear with me, I’ve done professional coding customer work, this ain’t that.

https://github.com/Devekko-Dev/devekko.store
https://github.com/Devekko-Dev/ash_json_gen_ecommerce_api
https://github.com/Devekko-Dev/ash_json_api_wrapper

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New

Other Trending Topics Top

mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews