How to use the @stoplight/types/dist.DiagnosticSeverity.Warning function in @stoplight/types

To help you get started, we’ve selected a few @stoplight/types 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 stoplightio / spectral / src / rulesets / oas / functions / oasOp2xxResponse / __tests__ / index.ts View on Github external
expect(results).toEqual([
      {
        code: 'operation-2xx-response',
        message: 'Operation must have at least one `2xx` response.',
        path: ['paths', '/path1', 'get', 'responses'],
        range: {
          end: {
            character: 30,
            line: 9,
          },
          start: {
            character: 20,
            line: 4,
          },
        },
        severity: DiagnosticSeverity.Warning,
      },
    ]);
  });
github stoplightio / spectral / src / rulesets / oas / functions / oasOp2xxResponse / __tests__ / index.ts View on Github external
expect(results).toEqual([
      {
        code: 'operation-2xx-response',
        message: 'Operation must have at least one `2xx` response.',
        path: ['paths', '/path1', 'get', 'responses'],
        range: {
          end: {
            character: 23,
            line: 4,
          },
          start: {
            character: 20,
            line: 4,
          },
        },
        severity: DiagnosticSeverity.Warning,
      },
    ]);
  });
});