Skip to content

API Types ​

Core types for API contract validation.

Endpoint Types ​

Supporting Types ​

HttpMethod ​

typescript
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS'

Severity ​

typescript
type Severity = 'critical' | 'high' | 'medium' | 'low'
LevelEmojiImpact
critical🔴Will break clients
high🔴Likely to break clients
medium🟡May cause issues
low🟢Non-breaking

DriftType ​

typescript
type DriftType =
  | 'missing-endpoint'
  | 'phantom-endpoint'
  | 'type-mismatch'
  | 'missing-field'
  | 'extra-field'
  | 'required-mismatch'
  | 'response-code-mismatch'
  | 'deprecated-not-removed'

Param, Schema, Response, SourceLocation ​

See NormalizedEndpoint for detailed definitions.

Type Relationships ​

typescript
parseAndNormalizeSpec(): NormalizedEndpoint[]
createAnalyzer().analyze(): NormalizedEndpoint[]
detectDrifts(): DriftResult[]

See Also ​

MIT License