跳转到主要内容

jsonschema CLI和pre-commit钩子

项目描述

pypi version supported pythons build pre-commit.ci status readthedocs documentation

check-jsonschema

基于jsonschema构建的JSON Schema CLI和pre-commit钩子。模式可以指定为本地或远程(HTTP或HTTPS)文件。

如果可能,远程文件将自动下载并缓存。

用法

check-jsonschema可以作为CLI工具安装和运行,也可以通过pre-commit。

示例pre-commit配置

以下配置使用check-jsonschema验证Github Workflow文件。

- repo: https://github.com/python-jsonschema/check-jsonschema
  rev: 0.29.3
  hooks:
    - id: check-github-workflows
      args: ["--verbose"]

作为CLI工具安装和运行

使用pipxbrew安装

pipx install check-jsonschema

或者

brew install check-jsonschema

然后运行,如下所示

check-jsonschema --schemafile schema.json instance.json

文档

完整文档可以在https://check-jsonschema.readthedocs.io/找到

项目详情


发布历史 发布通知 | RSS源

下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

check_jsonschema-0.29.3.tar.gz (244.3 kB 查看散列值)

上传时间

构建分发

check_jsonschema-0.29.3-py3-none-any.whl (229.2 kB 查看散列值)

上传时间 Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面