-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to validate schema for various files? #6
Comments
Currently, this Action only supports one schema input at a time. So if you had various files (all with different schemas), you would need to call the Action multiple times and ensure you use a new schema each time and only check the file that applies to that schema. Ideally, a feature would be added to support multiple schemas, and their corresponding file paths to check with each. |
I honestly think not having this will be a factor for people not using this. I don't know how many projects will have only a single json format they need to validate. I have a couple and writing an action for each is quite ugly ;) |
Sounds like this is something that we need then! I will be tracking work on this here: #7 cc: @Can-Sahin + @djrmarques |
I think it would be nice to implement something like the following.
This way, the action would allow to define a schema in the same folder as the files. I can try and make a PR with this depending on how much time I have on the weekend. |
If you enforce file namings or directory structure to use this action I'm pretty sure nobody will use this action. It's kinda absurd to enforce such a thing :) List of input json files and map of their schema files is the way to go. |
Not enforce, it would be an option. I think this would make sense in some cases, given that you could add schema files without changing the action code. You could give an option for defining the suffix of the files that should be considered schemas. Anyways, I also agree that your suggestion is a good one. |
For example, if I have the following project structure:
How can I setup schema validation?
It seems that the action only let's me specify a single schema validation file, via the
json_schema
andyaml_schema
parameters, but how do I set it up if I have various file across my repo?Thank you :)
The text was updated successfully, but these errors were encountered: