cziegeler commented on issue #11: SLING-8032 - Add a MOJO which is able to 
validate JSON Feature file against the JSON Schema
URL: 
https://github.com/apache/sling-slingfeature-maven-plugin/pull/11#issuecomment-436885201
 
 
   While a general purpose JSON schema mojo would be nice, I see at least two 
problems with this:
   
   - the configuration of where the json files are and which are included / 
excluded needs to be sync'ed with the configuration of where feature files are. 
Usually not a big deal as everyone uses the default configuration but as soon 
as you don't it can be come a subtle problem
   - the reference to the json schema needs to reference an external schema for 
the general purpose (a url). This might become tricky as you make sure that 
your schema is available publically in the internet and is accessible at build 
time
   I would rather prefer that we really only validate feature files. This way 
we can leverage the ProjectHelper.getFeatures to get the features. This method 
returns a map, and the key of each entry is the file path. This allows access 
to the raw feature files without having to repeat the configuration and the 
scanning logic. In addition if we bake in the schema for feature files we don't 
have any external dependency

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to