Can I use spectral as a linter for a JSON schema? #1409
-
Hi, I'm trying to implement some build-time validation for a collection of Azure Pipelines YAML templates and it seems like this project should work for me but I can't figure out how to configure it properly. I have a (very large) JSON schema file from Azure DevOps (it generates a unique one per organization since it includes installable extensions) saved to # .spectral.yml
rules:
azure-pipelines:
description: 'Must follow the azure-pipelines schema'
given: '$'
then:
function: schema
functionOptions:
schema:
$ref: schema.json Then I run the linter: This sort of works, but it has a few issues:
Is there a way to remove the first warning, and is there a way to make it print a meaningful warning/error for each possible issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hey! |
Beta Was this translation helpful? Give feedback.
Hey!
Sure, you can totally do it.
To get rid of the warning, you can pass
--ignore-unknown-format
LMK whether this was something you were looking for.