`Provided ruleset is not an object` error after upgrading from 1.37.12 to 1.37.13

Offen
#809 5 Kommentare 2 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@diatrcz arbeitet bereits daran.

Seit 13.7.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

We're seeing this error when trying to upgrade to the latest package:

iqp-service:openapi:validation: [ERROR] There was a problem with spectral.
iqp-service:openapi:validation: [ERROR] Provided ruleset is not an object
iqp-service:openapi:validation: [ERROR] Additional error details:
iqp-service:openapi:validation: [ERROR] RulesetValidationError: Provided ruleset is not an object
iqp-service:openapi:validation:     at assertValidRuleset (/workspace/app/device-management/node_modules/ibm-openapi-validator/node_modules/@stoplight/spectral-core/dist/ruleset/validation/assertions.js:12:15)
iqp-service:openapi:validation:     at new Ruleset (/workspace/app/device-management/node_modules/ibm-openapi-validator/node_modules/@stoplight/spectral-core/dist/ruleset/ruleset.js:35:44)
iqp-service:openapi:validation:     at Spectral.setRuleset (/workspace/app/device-management/node_modules/ibm-openapi-validator/node_modules/@stoplight/spectral-core/dist/spectral.js:66:73)
iqp-service:openapi:validation:     at setup (/workspace/app/device-management/node_modules/ibm-openapi-validator/src/spectral/index.js:160:12)
iqp-service:openapi:validation:     at async runSpectral (/workspace/app/device-management/node_modules/ibm-openapi-validator/src/spectral/index.js:34:20)
iqp-service:openapi:validation:     at async runValidator (/workspace/app/device-management/node_modules/ibm-openapi-validator/src/cli-validator/run-validator.js:234:17) {
iqp-service:openapi:validation:   code: 'invalid-ruleset-definition',
iqp-service:openapi:validation:   path: []
iqp-service:openapi:validation: }
device-service:openapi:validation: [ERROR] There was a problem with spectral.
device-service:openapi:validation: [ERROR] Provided ruleset is not an object
device-service:openapi:validation: [ERROR] Additional error details:
device-service:openapi:validation: [ERROR] RulesetValidationError: Provided ruleset is not an object
device-service:openapi:validation:     at assertValidRuleset (/workspace/app/device-management/node_modules/ibm-openapi-validator/node_modules/@stoplight/spectral-core/dist/ruleset/validation/assertions.js:12:15)
device-service:openapi:validation:     at new Ruleset (/workspace/app/device-management/node_modules/ibm-openapi-validator/node_modules/@stoplight/spectral-core/dist/ruleset/ruleset.js:35:44)
device-service:openapi:validation:     at Spectral.setRuleset (/workspace/app/device-management/node_modules/ibm-openapi-validator/node_modules/@stoplight/spectral-core/dist/spectral.js:66:73)
device-service:openapi:validation:     at setup (/workspace/app/device-management/node_modules/ibm-openapi-validator/src/spectral/index.js:160:12)
device-service:openapi:validation:     at async runSpectral (/workspace/app/device-management/node_modules/ibm-openapi-validator/src/spectral/index.js:34:20)
device-service:openapi:validation:     at async runValidator (/workspace/app/device-management/node_modules/ibm-openapi-validator/src/cli-validator/run-validator.js:234:17) {
device-service:openapi:validation:   code: 'invalid-ruleset-definition',
device-service:openapi:validation:   path: []
device-service:openapi:validation: }

We run the tool like this:

lint-openapi -s --impact-score -r .spectral.yml -w 370 src/modules/openapi/openapi-spec.json

Here is the .spectral.yml in this case:

extends: '@ibm-cloud/openapi-ruleset'
rules:
  ibm-enum-casing-convention: warn
  ibm-required-array-properties-in-response: warn

  # GET /workloads returns a usage status, this is not returned for sessions or legacy jobs (old pricing model)
  # added as a warning to unblock us for now but we should try to resolve this
  ibm-required-enum-properties-in-response: warn
Vorherrschende Sprache
JavaScript
Sterne
635
Forks
98
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
8

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus IBM/openapi-validator

Alle Issues in IBM/openapi-validator

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.