IBM/openapi-validator

configuration without rewriting whole rule

michelecurioni opened this issue · 1 comments

Hi,
I would like to change the default case for some of the IBM Cloud rules, but the only way I was able to do so was to override the whole rule.
For instance, operation-id-case-convention is by default snake case, but I want to use camel case:

'operation-id-case-convention': {
        description: 'Operation ids must follow a specified case convention',
		message: '{{error}}',
		given: operations,
		severity: 'warn',
		then: {
			function: operationIdCaseConvention,
			functionOptions: {
			  type: 'camel'
			}
		}
	}

Is there an easier way, instead of writing the whole rule again, if I only want to change the configuration?

Thanks

Hi @michelecurioni. Unfortunately, due to the nature of Spectral's configuration support, the only way to change the configuration is to rewrite the rule as you've done above.