cancel
Showing results for 
Search instead for 
Did you mean: 

Custom standarization rule: a field must exist and be a non-empty string

SOLVED
abernabero
New Contributor

Custom standarization rule: a field must exist and be a non-empty string

Hi everybody,

Anybody knows how it can be created a custom rule in the same style of the "API title must be present and non-empty string"? If I enable the check "Path exist" the field "Must match" is disabled and I can't set both configurations in the same rule.

At this moment I have to create a rule to force the existence of the parameter and another one to force the content.

As I can't see the configuration of the standard rules, I can't figure out a way to do it with only one rule. Anyway has any suggestion about this?

Thanks!!

1 ACCEPTED SOLUTION

Accepted Solutions
mhiggins
Staff

Re: Custom standarization rule: a field must exist and be a non-empty string

You are correct. Your “rule” requires both custom rules. First that it must exist and then second to apply the regex. 

Many of the “canned” SwaggerHub rules are not actually path/regex formed rules. 

View solution in original post

1 REPLY 1
mhiggins
Staff

Re: Custom standarization rule: a field must exist and be a non-empty string

You are correct. Your “rule” requires both custom rules. First that it must exist and then second to apply the regex. 

Many of the “canned” SwaggerHub rules are not actually path/regex formed rules. 

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements