How to use the apicurio-data-models.ValidationProblemSeverity.medium function in apicurio-data-models

To help you get started, we’ve selected a few apicurio-data-models examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Apicurio / apicurio-studio / front-end / studio / src / app / pages / settings / validation / validation.page.ts View on Github external
ruleset.getAllRules().forEach( rule => {
                // Severity is "medium" if the rule is spec mandated otherwise it's "ignore"
                newProfile.severities[rule.code] = rule.specMandated ? ValidationProblemSeverity.medium : ValidationProblemSeverity.ignore;
            });
        } else if (profile.id == -3) { // Enable all rules
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / problem-drawer.component.ts View on Github external
public iconFor(problem: ValidationProblem): string {
        switch (problem.severity) {
            case ValidationProblemSeverity.low:
                return "pficon-info";
            case ValidationProblemSeverity.medium:
                return "pficon-warning-triangle-o";
            case ValidationProblemSeverity.high:
                return "pficon-error-circle-o";
            default:
                return "pficon-info";
        }
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / services / validation.service.ts View on Github external
Object.getOwnPropertyNames(severities).forEach( key => {
            let value: string = severities[key];
            let severity: ValidationProblemSeverity = ValidationProblemSeverity.low;
            switch (value) {
                case "ignore": severity = ValidationProblemSeverity.ignore; break;
                case "low": severity = ValidationProblemSeverity.low; break;
                case "medium": severity = ValidationProblemSeverity.medium; break;
                case "high": severity = ValidationProblemSeverity.high; break;
            }
            rval[key] = severity;
        });
        return rval;
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / common / validation-aggregate.component.ts View on Github external
public iconFor(problem: ValidationProblem): string {
        switch (problem.severity) {
            case ValidationProblemSeverity.low:
                return "pficon-info";
            case ValidationProblemSeverity.medium:
                return "pficon-warning-triangle-o";
            case ValidationProblemSeverity.high:
                return "pficon-error-circle-o";
            default:
                return "";
        }
    }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / settings / validation / _components / profile-editor.component.ts View on Github external
    medium(): ValidationProblemSeverity { return ValidationProblemSeverity.medium; }
    low(): ValidationProblemSeverity { return ValidationProblemSeverity.low; }
github Apicurio / apicurio-studio / front-end / studio / src / app / pages / apis / {apiId} / editor / _components / common / validation-problem.component.ts View on Github external
public icon(): string {
        let problems: ValidationProblem[] = this.validationProblems();
        let maxSeverity: ValidationProblemSeverity = null;
        problems.forEach( problem => {
            if (maxSeverity === null || problem.severity > maxSeverity) {
                maxSeverity = problem.severity;
            }
        });
        switch (maxSeverity) {
            case ValidationProblemSeverity.low:
                return "pficon-info";
            case ValidationProblemSeverity.medium:
                return "pficon-warning-triangle-o";
            case ValidationProblemSeverity.high:
                return "pficon-error-circle-o";
            default:
                return "";
        }
    }