Replies: 3 comments 2 replies
-
|
There is multiple things to ensure the configuration following a specific format JSON Schema, for example. I might introduce a new spec for MAML Schema in the future. But for now I think different approach is needed. In most programming languages, you don't want just a schema validator. You want an ability to unmarshall bytes into your data structures. For example zod, pydantic. The idea is you not only validating your incoming data but also getting ready to use objects. This is why for MAML php I created a schema validator built in into the package. This MAML schema validator even can generate JSON schema. In the future I may introduce MAML Schema, but not right now. I think JSON Schemas can cover bunch of use cases. |
Beta Was this translation helpful? Give feedback.
-
|
The MAML IntelliJ plugin supports JSON Schema for MAML by reusing an existing JetBrains ecosystem pattern to convert MAML PSI trees to a "json-like" representation that the IDE's JSON schema infrastructure can evaluate. I don't know if that sort of infrastructure exists in other editor/IDE environments, but that's one potential pattern to extend JSON Schema support to other environments without too much overhead. |
Beta Was this translation helpful? Give feedback.
-
|
It seems RedHat's YAML language server implementation implements this general concept internally, so it might be a good reference to look at if you want similar functionality in other environments. https://github.com/redhat-developer/yaml-language-server/tree/main/src/languageservice |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just came across this project through Reddit, and from a first look it doesn't appear to support schemas.
Then a question arises: how do we ensure a configuration follows a specific format? Plus, without schemas we are not able to develop better editing tools/experiences.
Beta Was this translation helpful? Give feedback.
All reactions