-
Notifications
You must be signed in to change notification settings - Fork 0
/
problemDetails.openapi.yml
72 lines (58 loc) · 2.97 KB
/
problemDetails.openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
openapi: 3.1.0
info:
title: ProblemDetails
version: 1.0.1
description: |-
The sole purpose of this API definition is to expose the `ProblemDetails` DTO.
Other API definitions can **[include the `ProblemDetails` DTO by `$ref`erencing it](https://swagger.io/docs/specification/using-ref/)**.
### Usage Example:
```yaml
responses:
'400':
schema:
$ref: 'https://raw.githubusercontent.com/patrickp-at-work/rfc7807-openapi/1.0.1/problemDetails.openapi.yml#/components/schemas/ProblemDetails'
```
contact:
url: 'https://github.com/patrickp-at-work/rfc7807-openapi/'
name: patrickp-at-work
servers:
- url: 'http://localhost'
paths: {}
components:
schemas:
ProblemDetails:
title: ProblemDetails
type: object
properties:
type:
type: string
description: |-
A URI reference [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986) that identifies the problem type.
This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028](https://datatracker.ietf.org/doc/html/rfc7807#ref-W3C.REC-html5-20141028)).
When this member is not present, its value is assumed to be "about:blank".
Consumers MUST use the "type" string as the primary identifier for the problem type.
Accepts relative URIs.
title:
type: string
description: |-
A short, human-readable summary of the problem type.
It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231, Section 3.4](https://datatracker.ietf.org/doc/html/rfc7231#section-3.4)).
status:
type: integer
description: |-
The HTTP status code ([RFC7231, Section 6](https://datatracker.ietf.org/doc/html/rfc7231#section-6)) generated by the origin server for this occurrence of the problem.
This attribute, if present, is only advisory; it conveys the HTTP status code used for the convenience of the consumer.
detail:
type: string
description: |-
A human-readable explanation specific to this occurrence of the problem.
If present, this ought to focus on _helping the client correct the problem_, rather than giving debugging information.
Consumers SHOULD NOT parse the "detail" member for information.
instance:
type: string
description: |-
A URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.
Accepts relative URIs.
description: 'An OpenAPI representation of the ProblemDetails object as specified by [RFC 7807, section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).'
securitySchemes: {}