Skip to content

Commit

Permalink
[IDP-1499] Remove invalid string rule (#20)
Browse files Browse the repository at this point in the history
* Remove invalid string rule

* Remove test files

---------

Co-authored-by: Mathieu Gamache <mathieu.gamache@workleap.com>
  • Loading branch information
PrincessMadMath and Mathieu Gamache authored May 21, 2024
1 parent b359f52 commit 84ca10e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 53 deletions.
11 changes: 0 additions & 11 deletions .spectral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,6 @@ rules:
field: type
function: truthy

application-json-response-must-not-be-type-string:
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."
recommended: true
severity: warn
given: $..responses..content..application/json.schema.*
then:
field: type
function: pattern
functionOptions:
notMatch: 'string'

schema-name-length-must-be-short:
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."
given: $.components.schemas[*]~
Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ spectral --version
$ruleset = Join-Path $PSScriptRoot ".spectral.yaml"

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

0 comments on commit 84ca10e

Please sign in to comment.