JSON Schema/OpenAPI: AsyncAPI CLI `validate` over examples/ is a schema-examples check; `yarn test` → git-dependency program should be unknown; SchemaStore's tsconfig schemas taken as TS configs; library-driven validation harnesses
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- devtools, testing-qa
调研方向
This issue bundles several classifier mistakes. Start with project_validator/ecosystems/javascript/analysis.py (TSCONFIG_FILES around lines 25-28), project_validator/ecosystems/openapi.py (ASYNCAPI_CLI near line 189) and json_schema.py's _validator, then the corpus expectations in corpus/projects.toml. Done means the corpus results for the SchemaStore, asyncapi/spec, OAI and JSON Schema repos match the expected outcomes listed, with the tests passing.
由索引模型根据 Issue 内容生成。
描述
asyncapi/spec validates every document under examples/ with the AsyncAPI CLI on every PR (what the JSON Schema profile accepts as "a validator run on an examples directory") → WARN "no check of the schemas' examples". OAI/OpenAPI-Specification's yarn test expands to oai-spec-test, a program from a git dependency: the message says "no CI configuration runs … (or npm test)" when CI runs npm test — unknown, not FAIL. SchemaStore's src/schemas/json/tsconfig.json/jsconfig.json are the schemas for those files but type-checking credits "tsc (jsconfig.json, src/schemas/json/jsconfig.json, …) runs". All six JSON Schema repos and asyncapi/spec validate with a JSON Schema library driven by a project script (the dominant pattern of the ecosystem); a gap worth documenting.
Evidence from the corpus audit
SchemaStore/schemastore / type-checking
- kind: MESSAGE
- actual: PASS:
tsc (jsconfig.json, src/schemas/json/jsconfig.json, src/schemas/json/tsconfig.json and 2 more) runs/
consider enabling strict mode: "strict": true in the compilerOptions of tsconfig.json or deno check - expected: PASS naming
jsconfig.jsononly, with the strict-mode bonus:src/schemas/json/jsconfig.jsonand
src/schemas/json/tsconfig.jsonare the JSON Schemas for those config files (and the "2 more" are
src/test/tsconfig/tsconfig.json,src/test/jsconfig/jsconfig.jsonfixtures); the real config is strict. - evidence:
jsconfig.json:7:"strict": true;package.json:17:"typecheck": "tsc --project ./jsconfig.json",;
.github/workflows/validate.yml:20:- run: 'npm run typecheck';src/schemas/json/tsconfig.json:2-3:
"$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/tsconfig.json"(a
schema).project_validator/ecosystems/javascript/analysis.py:25,28:TSCONFIG_FILES = ("tsconfig.json", "jsconfig.json")/files=(*TSCONFIG_FILES, "tsconfig.*.json")— any file so named anywhere is a TypeScript
setting, and one non-strict file among them cancels the bonus. - repro:
jsconfig.jsonwith"strict": true,schemas/tsconfig.jsonbeing a JSON Schema (has$schema), CI runs
tsc --project jsconfig.json; the PASS lists both and advises strict mode. Fixes: skip files whose content is a
JSON Schema, and credit the config the--project/-pargument names. - confidence: high
asyncapi/spec / schema-examples
- kind: FALSE_NEGATIVE
- actual: WARN:
no check of the schemas' examples found in CI configuration/consider running in CI: spectral lint <description> (with a .spectral.yaml ruleset; …) - expected: PASS: every PR runs the AsyncAPI CLI's
validateover every document underexamples/(the repo's
examples are AsyncAPI documents), which is what the JSON Schema profile accepts as "a validator run on an
examples directory" (docs/ecosystems/json_schema.md,schema-examples);schema-validationalready PASSes on
the same command. - evidence:
.github/workflows/validate-examples.yml:22:find examples -type f \( -name "*.yml" -o -name "*.yaml" \) -not -path 'examples/social-media/common/*' | xargs -P 10 -L 1 asyncapi validate;ls examples | head→
adeo-kafka-request-reply-asyncapi.yml,anyof-asyncapi.yml, …. Validatorproject_validator/ecosystems/openapi.py:189:
ASYNCAPI_CLI = _linter("asyncapi", ASYNCAPI_ONLY, "asyncapi validate <description>", starts(("asyncapi", "validate")))— noexamples=Trueand nonames_examplespath (unlikejson_schema.py's_validator). - repro: workflow
run: asyncapi validate examples/a.yamlwithexamples/a.yamlan AsyncAPI document. - confidence: medium
OAI/OpenAPI-Specification / tests-run
- kind: MESSAGE
- actual: FAIL:
JavaScript/TypeScript: tests found in 2 file(s), but no CI configuration runs jest, vitest, mocha, node --test, deno test, bun test or playwright (or npm test) - expected: either PASS (CI runs the package's
testscript, which the message itself says counts) or an unknown:
yarn testexpands tooai-spec-test, a program from a git dependency the validator cannot read. Saying
"no CI configuration runs … (or npm test)" when CI runsyarn testcontradicts the evidence;vitest.config.mjs
(with 100 % statement/line thresholds) shows the runner is vitest. - evidence:
.github/workflows/schema-tests.yaml:37:run: yarn test;package.json:25:"test": "oai-spec-test",;
package.json:30:"@oai/build-infra": "git+https://github.com/OAI/build-infra.git#main";
vitest.config.mjs:1-5:import { createVitestConfig } from "@oai/build-infra/vitest-config";…thresholds: … statements: 100, lines: 100. Facts dump:"line": "oai-spec-test"with noUnknown. - repro:
package.json"test": "some-bin-from-a-dependency", CIyarn test: FAIL with a message namingnpm test
as acceptable. Either treat the package'stestscript as a run when its program is unknown (and say so), or
record anUnknown("the program oai-spec-test")so strict mode errors. - confidence: medium
all six JSON Schema repos, asyncapi/spec / schema-validation, schema-examples, tests-run (library-based harnesses)
- kind: UNSUPPORTED
- actual: FAIL
schema-validation: no schema validation found in CI configurationand WARNschema-examplesin
SchemaStore, JSON-Schema-Test-Suite, compose-spec, CycloneDX, asyncapi/spec-json-schemas, OAI; FAIL/WARN
tests-runwhere the harness is the test. - expected: these repos do validate (and check valid/invalid examples) on every PR, but with a JSON Schema
library driven by a project script, not a CLI the profiles know. Not a bug; the dominant pattern of the
ecosystem. Tools and where they are used:- SchemaStore:
node ./cli.js check(.github/workflows/validate.yml:22) runs ajv, ajv-draft-04 and
@exodus/schemasafeoversrc/test/**andsrc/negative_test/**(package.json:28,32-33;cli.js:2110:
check: Run all build checks). - JSON-Schema-Test-Suite:
python -m tox→tox.ini:9:commands = {envpython} validation/check_validation_suite.py
(jsonschema==4.19.0,validation/check_validation_suite.py:21:import jsonschema.validators); and
.github/workflows/annotation-tests.yml:21:deno … annotations/annotation-tests.ts(:2:
import { validate } from "npm:@hyperjump/json-schema/draft-07";). - asyncapi/spec-json-schemas:
package.json:8:"test": "npm run build && vitest run && npm run validate:schemas",
:17:"validate:schemas": "node scripts/validate-schemas.js"(ajv, ajv-draft-04 in devDependencies). - CycloneDX:
tools/src/test/js/package.json:20-22(node -- json-schema-lint-tests.js, ajv);
tools/src/test/php/composer.json:8:"opis/json-schema": "2.6.0"; Java tests with networknt
(JsonSchemaVerificationTest.java), XML Schema checks via JAXP; buf via docker (see thetest.shfinding). - OAI:
yarn test→oai-spec-test(hyperjump, vitest) over_archive_/schemas/v3.0/pass/*.yamlandfail/. - asyncapi/spec:
.github/workflows/validate-embedded-examples.yml:22-23:run: npm run validate:examples/
working-directory: ./scripts/validation/→node embedded-examples-validation.jswith@asyncapi/parser.
Common pieces the profiles could learn:@hyperjump/json-schemaand@exodus/schemasafeas JS validators (as
dependencies imported by a*.test.*file that CI runs), thejsonschema/referencingPython libraries, and
pass/+fail/example directories (OAI,_archive_/schemas/v3.0/pass/) alongsidevalid//invalid/.
- SchemaStore:
- evidence: as listed.
- repro: n/a (gap, not a bug)
- confidence: medium
Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.
🤖 Generated with Claude Code
- 主要语言
- Python
- 星标
- 4
- 派生
- 1
- 平均合并
- 10 小时 41 分钟
- 30 天内合并 PR
- 79
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cpp-best-practices/project_validator 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
cpp-best-practices/project_validator#267 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
cpp-best-practices/project_validator#263 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
cpp-best-practices/project_validator#260 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
cpp-best-practices/project_validator#259 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
cpp-best-practices/project_validator#255 ·
维护者通常 1 天内回复
查看 cpp-best-practices/project_validator 的全部 Issue
相似的 Issue
-
plot_graph crashes when a mesh node has no m2m edge可能已有人在做 @tygvi 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
mllam/neural-lam#883 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement possible-duplicate
难度 1/5 1-3 小时 新手友好度 78/100
AOSSIE-Org/PictoPy#1715 · 2 条评论 ·
维护者通常 6 天内回复
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on them未关闭
难度 2/5 1-3 小时 新手友好度 72/100
NVIDIA/auto-ontology#511 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ethereum/execution-specs#3996 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
Project-N-E-K-O/N.E.K.O#3725 ·
维护者通常 1 天内回复