Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b6216c1
feat: implement new rule to check illogical usage of composition keyw…
AlbinaBlazhko17 Oct 2, 2025
bfbf5da
fix: imports in new rule
AlbinaBlazhko17 Oct 21, 2025
f7f7a12
refactor: remove unused functions and types
AlbinaBlazhko17 Oct 21, 2025
b3b5496
chore: change return statement in skip to be more redable
AlbinaBlazhko17 Oct 24, 2025
4c87b20
chore: change return statement from null to undefined
AlbinaBlazhko17 Oct 24, 2025
94fd1d3
fix: check for duplicated schemas
AlbinaBlazhko17 Oct 24, 2025
e2badae
chore: update report messages
AlbinaBlazhko17 Oct 24, 2025
e9552db
refactor: arePropertiesMutuallyExclusive function
AlbinaBlazhko17 Oct 27, 2025
e41ae72
refactor: checking type of object
AlbinaBlazhko17 Oct 27, 2025
8cec854
refactor: check for mutually exclusive function
AlbinaBlazhko17 Oct 27, 2025
a583be2
Merge main into feat/new-linting-rules-for-oneof-anyof-allof
AlbinaBlazhko17 Apr 14, 2026
6814cd1
chore: fixes after merge
AlbinaBlazhko17 Apr 14, 2026
f60555e
chore: run formatter
AlbinaBlazhko17 Apr 14, 2026
44a37b5
chore: update snapshots
AlbinaBlazhko17 Apr 14, 2026
438de33
Merge branch 'main' into feat/new-linting-rules-for-oneof-anyof-allof
AlbinaBlazhko17 Apr 14, 2026
1e7cc5b
refactor: logic refactoring after code review
AlbinaBlazhko17 Apr 14, 2026
51b996c
feat: add tests and additional checks
AlbinaBlazhko17 Apr 14, 2026
6c68b1c
chore: update snapshot
AlbinaBlazhko17 Apr 14, 2026
806d303
chore: add new rule in alphabetic order
AlbinaBlazhko17 Apr 14, 2026
c2f781f
chore: update snapshot
AlbinaBlazhko17 Apr 16, 2026
aa5255a
feat: improve null schema detection
AlbinaBlazhko17 Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ exports[`resolveConfig > should ignore minimal from the root and read local file
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "error",
Expand Down Expand Up @@ -186,6 +187,7 @@ exports[`resolveConfig > should ignore minimal from the root and read local file
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "error",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -245,6 +247,7 @@ exports[`resolveConfig > should ignore minimal from the root and read local file
"no-enum-type-mismatch": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "error",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -510,6 +513,7 @@ exports[`resolveConfig > should resolve extends with local file config which con
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -573,6 +577,7 @@ exports[`resolveConfig > should resolve extends with local file config which con
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -632,6 +637,7 @@ exports[`resolveConfig > should resolve extends with local file config which con
"no-enum-type-mismatch": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down
18 changes: 18 additions & 0 deletions packages/core/src/config/__tests__/load.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -315,6 +316,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "off",
Expand Down Expand Up @@ -376,6 +378,7 @@ describe('loadConfig', () => {
"no-enum-type-mismatch": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "off",
Expand Down Expand Up @@ -570,6 +573,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -633,6 +637,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -692,6 +697,7 @@ describe('loadConfig', () => {
"no-enum-type-mismatch": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -899,6 +905,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -962,6 +969,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "error",
Expand Down Expand Up @@ -1021,6 +1029,7 @@ describe('loadConfig', () => {
"no-enum-type-mismatch": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "error",
Expand Down Expand Up @@ -1316,6 +1325,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -1381,6 +1391,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "off",
Expand Down Expand Up @@ -1442,6 +1453,7 @@ describe('loadConfig', () => {
"no-enum-type-mismatch": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "off",
Expand Down Expand Up @@ -1636,6 +1648,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -1699,6 +1712,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -1758,6 +1772,7 @@ describe('loadConfig', () => {
"no-enum-type-mismatch": "error",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "error",
"no-illogical-composition-keywords": "warn",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "warn",
"no-invalid-schema-examples": "warn",
Expand Down Expand Up @@ -1965,6 +1980,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": {
"allowAdditionalProperties": false,
"severity": "warn",
Expand Down Expand Up @@ -2028,6 +2044,7 @@ describe('loadConfig', () => {
"no-example-value-and-externalValue": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "error",
Expand Down Expand Up @@ -2087,6 +2104,7 @@ describe('loadConfig', () => {
"no-enum-type-mismatch": "warn",
"no-http-verbs-in-paths": "off",
"no-identical-paths": "warn",
"no-illogical-composition-keywords": "off",
"no-invalid-media-type-examples": "warn",
"no-invalid-parameter-examples": "off",
"no-invalid-schema-examples": "error",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/config/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const all: RawGovernanceConfig<'built-in'> = {
'info-license-strict': 'error',
'no-path-trailing-slash': 'error',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-ambiguous-paths': 'error',
'no-invalid-schema-examples': 'error',
'no-invalid-parameter-examples': 'error',
Expand Down Expand Up @@ -128,6 +129,7 @@ const all: RawGovernanceConfig<'built-in'> = {
'info-license-strict': 'error',
'no-path-trailing-slash': 'error',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-ambiguous-paths': 'error',
'no-invalid-schema-examples': 'error',
'no-invalid-parameter-examples': 'error',
Expand Down Expand Up @@ -192,6 +194,7 @@ const all: RawGovernanceConfig<'built-in'> = {
'info-license-strict': 'error',
'no-path-trailing-slash': 'error',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-ambiguous-paths': 'error',
'no-invalid-schema-examples': 'error',
'no-invalid-parameter-examples': 'error',
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/config/minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const minimal: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'warn',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'warn',
'no-illogical-composition-keywords': 'off',
'no-invalid-media-type-examples': {
severity: 'warn',
allowAdditionalProperties: false,
Expand Down Expand Up @@ -124,6 +125,7 @@ const minimal: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'warn',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'warn',
'no-illogical-composition-keywords': 'off',
'no-invalid-media-type-examples': 'warn',
'no-invalid-parameter-examples': 'off',
'no-invalid-schema-examples': 'off',
Expand Down Expand Up @@ -181,6 +183,7 @@ const minimal: RawGovernanceConfig<'built-in'> = {
'no-enum-type-mismatch': 'warn',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'warn',
'no-illogical-composition-keywords': 'off',
'no-invalid-media-type-examples': 'warn',
'no-invalid-parameter-examples': 'off',
'no-invalid-schema-examples': 'off',
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/config/recommended-strict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const recommendedStrict: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-invalid-media-type-examples': {
severity: 'error',
allowAdditionalProperties: false,
Expand Down Expand Up @@ -124,6 +125,7 @@ const recommendedStrict: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-invalid-media-type-examples': 'error',
'no-invalid-parameter-examples': 'error',
'no-invalid-schema-examples': 'error',
Expand Down Expand Up @@ -181,6 +183,7 @@ const recommendedStrict: RawGovernanceConfig<'built-in'> = {
'no-enum-type-mismatch': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-invalid-media-type-examples': 'error',
'no-invalid-parameter-examples': 'error',
'no-invalid-schema-examples': 'error',
Expand Down Expand Up @@ -222,8 +225,8 @@ const recommendedStrict: RawGovernanceConfig<'built-in'> = {
'spec-components-invalid-map-name': 'error',
'spec-discriminator-defaultMapping': 'error',
'spec-example-values': 'error',
'spec-no-invalid-encoding-combinations': 'error',
'spec-no-invalid-tag-parents': 'error',
'spec-no-invalid-encoding-combinations': 'error',
'spec-querystring-parameters': 'error',
'spec-strict-refs': 'off',
'tag-description': 'error',
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/config/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const recommended: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'warn',
'no-invalid-media-type-examples': {
severity: 'warn',
allowAdditionalProperties: false,
Expand Down Expand Up @@ -124,6 +125,7 @@ const recommended: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'warn',
'no-invalid-media-type-examples': 'warn',
'no-invalid-parameter-examples': 'warn',
'no-invalid-schema-examples': 'warn',
Expand Down Expand Up @@ -181,6 +183,7 @@ const recommended: RawGovernanceConfig<'built-in'> = {
'no-enum-type-mismatch': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'warn',
'no-invalid-media-type-examples': 'warn',
'no-invalid-parameter-examples': 'warn',
'no-invalid-schema-examples': 'warn',
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/config/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const spec: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'off',
'no-invalid-media-type-examples': {
severity: 'off',
allowAdditionalProperties: false,
Expand Down Expand Up @@ -124,6 +125,7 @@ const spec: RawGovernanceConfig<'built-in'> = {
'no-example-value-and-externalValue': 'error',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-invalid-media-type-examples': 'off',
'no-invalid-parameter-examples': 'off',
'no-invalid-schema-examples': 'off',
Expand Down Expand Up @@ -181,6 +183,7 @@ const spec: RawGovernanceConfig<'built-in'> = {
'no-enum-type-mismatch': 'off',
'no-http-verbs-in-paths': 'off',
'no-identical-paths': 'error',
'no-illogical-composition-keywords': 'error',
'no-invalid-media-type-examples': 'off',
'no-invalid-parameter-examples': 'off',
'no-invalid-schema-examples': 'off',
Expand Down
Loading
Loading