Skip to content

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

Description

@mriedem

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions