Marcus
JsonXema is a JSON Schema validator with support for draft 04, 06, and 07. JsonXema based on elixir schema validator Xema.
https://github.com/hrzndhrn/json_xema
Xema is a schema validator inspired by JSON Schema. In Xema schemas can be created in Elixir and any data structure can be validated.
https://github.com/hrzndhrn/xema
Feedback, critic, improvements and PRs are very welcome, thanks!
Trending in Announcing
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 15 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Marcus
Hello @egze thanks for the
and sorry for the late response.
The JSON-Editor could be a good example to show how
xemaworks together with phoenix-forms.At the moment I have no idea for the form but a simplified first approach for the schema could be:
That would work for:
In case of invalid data the error reason is a little bit hard to handle.
I think this could be improved in
xema.egze
@Marcus your library is
I’m wondering, how would you build a form in Phoenix for schemas that are not known ahead of time? I’m thinking something flexible like json-editor
Marcus
I have made some fixes. The attribute
@default trueto mark a schema as default is now deprecated. That is not a part of your example but a part of the problem. Now a default schema is marked with the:defaultoption.I still have to adjust some things before I release a new version. If you like you can test the fix/refactoring with the GitHub main brach:
{:xema, git: "https://github.com/hrzndhrn/xema"}.Marcus
I am happy that you like
Xema. I will take a look to the dialyzer issue. Thanks for reporting. If you like you can crate an issue on GitHub.jonericcook
when i remove
, multi: trueit makes it happyjonericcook
@Marcus awesome tool! I was wondering if there are some config settings to make ElixirLS Dialyzer happy?
Marcus
Currently there is no way to generate docs from the schemas/structs with
Xema. But it would be nice to have a feature like NimbleOptions.docs/2. I will put it on my todo list.jonericcook
@Marcus is there a way to generate docs from a xema struct? Similar to a typespec or what is done in NimbleOptions.
Marcus
The new release of
Xemaadds the macrosfieldandrequiredto create struct schemas.A more extensive example can be found at Examples > Struct
Marcus
Xema0.9.0 is released. The new version comes with some breaking changes, see changelog.New features
Xema.castExample:
More examples can be found at section Cast and Examples - Cast JSON.