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
Since HCL compiles to JSON, using JSON schema to validate the configuration is natural. For this I suggest a feature of the sort which would look for a magic comment in the file of the form:
When clubbed with #24 I see a pass-through which applications in other languages can invoke so that the HCL format can be used to write config, validate it and translate it to general-purpose JSON input. This means existing apps using JSON can benefit from simpler config and added validation.
PS: This looks like a duplicate of #3 which is closed by what looks like an unrelated commit.
The text was updated successfully, but these errors were encountered:
My current thinking on this topic is that it should exist as a higher level tool about HCL but that at the moment it isn't proven enough to integrate first class into HCL.
As for #3, I think that was accidentally closed when I did an import of fatih's work into HCL (which was from another repo). Funny. But the same comment stands here. :)
Thanks for the explanation. I guess it makes sense to keep the HCL library itself light as this feature would be more useful within an IDE while the user is typing the config out by hand.
Hi,
Since HCL compiles to JSON, using JSON schema to validate the configuration is natural. For this I suggest a feature of the sort which would look for a magic comment in the file of the form:
# json_schema_web = "https://schema-domain.com/path/to/schema-file.json"
or
# json_schema_path = "../config/service-name-config-schema.json"
Oh and if magic comments are too much magic (I feel so personally), an alternative approach could be used to specify the schema file path.
The validation can be powered by https://github.com/xeipuuv/gojsonschema
When clubbed with #24 I see a pass-through which applications in other languages can invoke so that the HCL format can be used to write config, validate it and translate it to general-purpose JSON input. This means existing apps using JSON can benefit from simpler config and added validation.
PS: This looks like a duplicate of #3 which is closed by what looks like an unrelated commit.
The text was updated successfully, but these errors were encountered: