You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User story.
As a ruleset maintainer, I would like to have a built-in casing function I could make use of in my own rulesets.
For the time being, in order to enforce casing, you need to use pattern function and come up with a regular expression.
Describe the solution you'd like
We could make enforcing naming convention in Spectral easier by providing casing function with pre-defined set of regular expressions, such as:
pascal case
camel case
kebab case
snake case
etc.
casing function could also take a custom regular expression, same as pattern does.
Here is an example rule definition:
given: $.paths[*].[*].[*].operationId # I know it looks weird, it's not important thoughthen:
function: casingfunctionOptions:
case: pascal
Additional context
It's a complementary functionality to #405
The text was updated successfully, but these errors were encountered:
The goal here is to make the core functions, then let #405 create the rules? I'm game for that, let's get this one done sooner rather than later. It's a major use case.
User story.
As a ruleset maintainer, I would like to have a built-in casing function I could make use of in my own rulesets.
For the time being, in order to enforce casing, you need to use
pattern
function and come up with a regular expression.Describe the solution you'd like
We could make enforcing naming convention in Spectral easier by providing
casing
function with pre-defined set of regular expressions, such as:casing
function could also take a custom regular expression, same aspattern
does.Here is an example rule definition:
Additional context
It's a complementary functionality to #405
The text was updated successfully, but these errors were encountered: