Skip to content

Commit 84ca10e

Browse files
PrincessMadMathMathieu Gamache
andauthored
[IDP-1499] Remove invalid string rule (#20)
* Remove invalid string rule * Remove test files --------- Co-authored-by: Mathieu Gamache <[email protected]>
1 parent b359f52 commit 84ca10e

File tree

4 files changed

+0
-53
lines changed

4 files changed

+0
-53
lines changed

.spectral.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,6 @@ rules:
101101
field: type
102102
function: truthy
103103

104-
application-json-response-must-not-be-type-string:
105-
description: "Responses of type application/json must not be of type string. Having a type:string as a response causes the client generation to fail."
106-
recommended: true
107-
severity: warn
108-
given: $..responses..content..application/json.schema.*
109-
then:
110-
field: type
111-
function: pattern
112-
functionOptions:
113-
notMatch: 'string'
114-
115104
schema-name-length-must-be-short:
116105
description: "Schema name must not be too long to support client generation. Current limitation comes from Ruby packages which uses tar and has a limit of 100 characters."
117106
given: $.components.schemas[*]~

TestSpecs/application-json-response-must-not-be-type-string-invalid.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

TestSpecs/application-json-response-must-not-be-type-string-valid.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

test.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ spectral --version
88
$ruleset = Join-Path $PSScriptRoot ".spectral.yaml"
99

1010
$tests = @(
11-
@{ rule = "application-json-response-must-not-be-type-string"; expectError = $false; filename = "application-json-response-must-not-be-type-string-valid.yaml" },
12-
@{ rule = "application-json-response-must-not-be-type-string"; expectError = $true; filename = "application-json-response-must-not-be-type-string-invalid.yaml" },
1311
@{ rule = "items-must-have-a-type"; expectError = $false; filename = "items-must-have-a-type-valid.yaml" },
1412
@{ rule = "items-must-have-a-type"; expectError = $true; filename = "items-must-have-a-type-invalid.yaml" },
1513
@{ rule = "must-accept-content-types"; expectError = $false; filename = "must-accept-content-types-valid.yaml" },

0 commit comments

Comments
 (0)