Skip to content

Commit 3f41c2c

Browse files
pengyingclaude
andcommitted
chore: add Spectral lint to lint:openapi script
Runs Spectral's OpenAPI linter (custom rules in .spectral.yaml) as part of the lint:openapi pipeline, after Redocly bundle and lint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 80ac181 commit 3f41c2c

34 files changed

Lines changed: 828 additions & 750 deletions

.spectral.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,11 @@ rules:
7676
# ============================================================
7777

7878
# Request bodies must use $ref, not inline schemas.
79-
# Note: Spectral resolves $refs in the bundled spec, so some component-level
80-
# false positives appear — the real violations are on paths.* entries.
8179
no-inline-request-schema:
8280
description: Request body schemas must use $ref, not inline definitions
8381
message: "Use $ref for request body schema instead of inline definition. See openapi/README.md#avoid-inline-schemas-in-request-and-response-definitions"
8482
severity: error
83+
resolved: false
8584
given: "$.paths[*][get,post,put,patch,delete].requestBody.content[application/json].schema"
8685
then:
8786
field: "$ref"
@@ -92,6 +91,7 @@ rules:
9291
description: Response body schemas must use $ref, not inline definitions
9392
message: "Use $ref for response schema instead of inline definition. See openapi/README.md#avoid-inline-schemas-in-request-and-response-definitions"
9493
severity: error
94+
resolved: false
9595
given: "$.paths[*][get,post,put,patch,delete].responses[*].content[application/json].schema"
9696
then:
9797
field: "$ref"

0 commit comments

Comments
 (0)