Ensures that every operation with (400-499) HTTP response has content-type application/problem+json and fields title and type.
| OAS | Compatibility | 
|---|---|
| 2.0 | ❌ | 
| 3.0 | ✅ | 
| 3.1 | ✅ | 
| 3.2 | ✅ | 
Problem Details for HTTP APIs are a way to carry machine- readable details of errors in a HTTP response to avoid the need to define new error response formats for HTTP APIs.
Every operation with (400-499) HTTP response should have content-type application/problem+json and fields title and type according to the specification.
| Option | Type | Description | 
|---|---|---|
| severity | string | Possible values: off,warn,error. Defaultoff(inrecommendedconfiguration). | 
An example configuration:
rules:
  operation-4xx-problem-details-rfc7807: errorGiven this configuration:
rules:
  operation-4xx-problem-details-rfc7807: errorExample of incorrect operation response:
post:
  responses:
    '400':
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                type: string
              title:
                type: stringExample of correct operation response:
post:
  responses:
    '400':
      content:
        application/problem+json:
          schema:
            type: object
            properties:
              type:
                type: string
              title:
                type: string