@@ -13,7 +13,7 @@ considering this response they would not react appropriate to the response. If t
13
13
` 200 ` or a ` 404 ` , they would not have considered ` 202 ` and following the ` location ` header after waiting the amount of time
14
14
suggested by the ` retry-after ` header. That is why this is considered a breaking change.
15
15
16
- ![ 202 as breaking change to the API] (../sample-reports/202_added_breaking.png)
16
+ ![ 202 as breaking change to the API] ( ../sample-reports/202_added_breaking.png )
17
17
18
18
The ` 202 ` may be a response that services needs to introduce, if e.g. the time it takes to complete the response increases
19
19
over time due to whatever reasons, it could be a creation of information that due to changes in legislation takes longer.
@@ -27,50 +27,50 @@ back, the client would not be ready to react by following the `location` header
27
27
Adding a ` 301 ` and ` 307 ` to your API makes it easier to move endpoints and having that as a part of your Open API
28
28
specification may be worth considering.
29
29
30
- ![ 301 as breaking change to the API] (../sample-reports/301_added_good_pot-breaking.png)
30
+ ![ 301 as breaking change to the API] ( ../sample-reports/301_added_good_pot-breaking.png )
31
31
32
- ![ 307 as breaking change to the API] (../sample-reports/307_added_pot-breaking.png)
32
+ ![ 307 as breaking change to the API] ( ../sample-reports/307_added_pot-breaking.png )
33
33
34
34
Having an existing API ` (!) ` where a ` 301 ` or ` 307 ` is not defined is therefore reported as something you evaluate if yu want
35
35
to include in your API or not.
36
36
37
- ![ 301 missing in the existing API is a breaking change waiting to happen] (../sample-reports/301_missing_pot-break.png)
37
+ ![ 301 missing in the existing API is a breaking change waiting to happen] ( ../sample-reports/301_missing_pot-break.png )
38
38
39
39
Having the ability to offer a "service" to clients where they can ask if the need to re-read a resource or whether the
40
40
client still has a valid version of the resource is the reason for including ` 304 ` in the potentially breaking part.
41
41
Therefore an existing API without ` 304 ` might want to be extended with that, the reason for it being perceived as
42
42
breaking is a scalability perspective as this can allow som services (having resources with a non-realtime character)
43
43
to scale higher (or have a lower operational cost for the same load).
44
44
45
- ![ 304 missing in the existing API is a potential for offloading services] (../sample-reports/304_missing_pot-break.png)
45
+ ![ 304 missing in the existing API is a potential for offloading services] ( ../sample-reports/304_missing_pot-break.png )
46
46
47
47
The most frequent used responses are probably ` 200 ` and ` 404 ` , failing to have these as a part of the existing API or the
48
48
new is considered a potential breaking change.
49
49
50
- ![ 404 missing in the API is a potential break] (../sample-reports/404_missing_pot-break.png)
50
+ ![ 404 missing in the API is a potential break] ( ../sample-reports/404_missing_pot-break.png )
51
51
52
52
If the ` 200 ` is added to the new API it needs to include som headers like ` X-Log-Token ` to enable clients to refer to
53
53
incidents in a way of their choosing and in that way handle bugs etc. more efficient, here the some headers concerning
54
54
rate limits are added as required by the service in the new version of the API, which makes a lot of sense, as they are
55
55
required this is considered a breaking change to the new API.
56
56
57
- ![ 200 missing in the API is a potential break] (../sample-reports/200_limit-breaking.png)
57
+ ![ 200 missing in the API is a potential break] ( ../sample-reports/200_limit-breaking.png )
58
58
59
59
If a client sets the ` Accept ` header to a content-type unknown to the server, some services are responding with a ` 400 ` ,
60
60
whereas the ` 415 ` seems more appropriate for this situation, in order to avoid breaking the API when introducing this
61
61
response code later it seems like a good and sound idea to include this from the start.
62
62
63
- ![ 415 missing in the existing API is a potential break waiting to happen] (../sample-reports/415_missing_pot-break.png)
63
+ ![ 415 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/415_missing_pot-break.png )
64
64
65
65
Including a number of responses from the start seems to worth considering, which is why a number of these are considered
66
66
potential breaks, se below.
67
67
68
- ![ 429 missing in the existing API is a potential break waiting to happen] (../sample-reports/429_missing_pot-break.png)
68
+ ![ 429 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/429_missing_pot-break.png )
69
69
70
70
Not having this as a part of your API means you cannot ask client politely to back off for
71
71
a while (specified in the ` retry-after ` ) header
72
72
73
- ![ 412 missing in the existing API is a more precise way to signal pre-conditional errors to clients] (../sample-reports/412_missing_pot-break.png)
73
+ ![ 412 missing in the existing API is a more precise way to signal pre-conditional errors to clients] ( ../sample-reports/412_missing_pot-break.png )
74
74
75
75
This is a more specific error in the event of validation errors, in many situations the ` 400 ` is used and it may, the
76
76
` 412 ` is a little more precise for pre-conditional validation issues. ` 400 ` is considered as one of the mandatory alongside
@@ -81,7 +81,7 @@ How long must you remember an endpoint, if you did not have the `301` or `307` s
81
81
endpoints and you know that you want to be able to terminate a given endpoint someday somehow. This is where ` 410 ` comes
82
82
into the picture:
83
83
84
- ![ 410 missing in the existing API is a potential break waiting to happen] (../sample-reports/410_missing_pot-break.png)
84
+ ![ 410 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/410_missing_pot-break.png )
85
85
86
86
This is arguable whether this should be a mandatory response in every endpoint in a service or not, it is however worth
87
87
considering whether it is something you need. If not specified, the contracts and terms for bringing an endpoint down
@@ -91,20 +91,20 @@ The `505` response is making ready for the next version of HTTP, so it is kind o
91
91
endpoints down or can you cease the support for a given version of content, of API structure and how to do that using
92
92
HTTP response code and other mechanisms to do it in a way that the clients can understand and follow.
93
93
94
- ![ 505 missing in the existing API is a potential break waiting to happen] (../sample-reports/505_missing_pot-break.png)
94
+ ![ 505 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/505_missing_pot-break.png )
95
95
96
96
The error handling from the services side are usually done by 500 and possibly 503 and thus they must be part of the
97
97
responses that any endpoint can return.
98
98
99
- ![ 500 missing in the existing API is a potential break waiting to happen] (../sample-reports/500_missing_pot-break.png)
99
+ ![ 500 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/500_missing_pot-break.png )
100
100
101
- ![ 503 missing in the existing API is a potential break waiting to happen] (../sample-reports/503_missing_pot-break.png)
101
+ ![ 503 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/503_missing_pot-break.png )
102
102
103
103
The ` 503 ` is suggested having a ` retry-after ` header to signal back to the client when the service is expected to be
104
104
available again, the aim of that is that clients can use this for information to the application user and thus informing
105
105
the users to prepare the user for this situation the best the client can.
106
106
107
- ![ 503 retry-after header is required] (../sample-reports/503_added_required_header-breaking.png)
107
+ ![ 503 retry-after header is required] ( ../sample-reports/503_added_required_header-breaking.png )
108
108
109
109
Adding that header and make it required is a potentially breaking thing as clients may not do anything about the header
110
110
and thus the service downtime (or slow performance) may continue. Again here you could argue that this type of header
@@ -116,52 +116,52 @@ e.g. with a certified level according to a given Open API Diff profile.
116
116
The response code regarding authorization and access ` 401 ` and ` 403 ` must be part of any protected API and thus they
117
117
are included in the mandatory set of responses here.
118
118
119
- ![ 401 missing in the existing API is a potential break waiting to happen] (../sample-reports/401_missing_pot-break.png)
119
+ ![ 401 missing in the existing API is a potential break waiting to happen] ( ../sample-reports/401_missing_pot-break.png )
120
120
121
121
122
122
The elaborated part of the reports attempt to state a few words on the observation:
123
123
124
- ![ The elaborated report on responses] (../sample-reports/addedResponsesChange.png)
124
+ ![ The elaborated report on responses] ( ../sample-reports/addedResponsesChange.png )
125
125
126
126
and
127
127
128
- ![ The elaborated report on responses] (../sample-reports/Compliance_Responses_Change.png)
128
+ ![ The elaborated report on responses] ( ../sample-reports/Compliance_Responses_Change.png )
129
129
130
130
131
131
On top of that there are som even more opinionated parts, such as the parts on using content-types as versioning
132
132
mechanism for content in endpoints:
133
133
134
- ![ The elaborated report on content types] (../sample-reports/Compliance_ContentTypes.png)
134
+ ![ The elaborated report on content types] ( ../sample-reports/Compliance_ContentTypes.png )
135
135
136
- ![ The elaborated report on content types projection added] (../sample-reports/projectionAdded.png)
136
+ ![ The elaborated report on content types projection added] ( ../sample-reports/projectionAdded.png )
137
137
138
138
139
139
And concrete observations like:
140
140
141
- ![ The elaborated report on content types] (../sample-reports/descriptionExtended-pot-break.png)
141
+ ![ The elaborated report on content types] ( ../sample-reports/descriptionExtended-pot-break.png )
142
142
143
- ![ The elaborated report on content types] (../sample-reports/header_pattern_changed-pot-break.png)
143
+ ![ The elaborated report on content types] ( ../sample-reports/header_pattern_changed-pot-break.png )
144
144
145
- ![ The elaborated report on content types] (../sample-reports/ResponseCode_200_changes.png)
145
+ ![ The elaborated report on content types] ( ../sample-reports/ResponseCode_200_changes.png )
146
146
147
- ![ The elaborated report on content types] (../sample-reports/property_changed_to_required.png)
147
+ ![ The elaborated report on content types] ( ../sample-reports/property_changed_to_required.png )
148
148
149
149
And:
150
150
151
- ![ The elaborated report on header changes] (../sample-reports/descriptionExtended-pot-break.png)
151
+ ![ The elaborated report on header changes] ( ../sample-reports/descriptionExtended-pot-break.png )
152
152
153
- ![ The elaborated report on path parameter changes] (../sample-reports/projectionAdded.png)
153
+ ![ The elaborated report on path parameter changes] ( ../sample-reports/projectionAdded.png )
154
154
155
155
And suggested improvements to the existing design - here in the form of suggesting that null is not a good definition
156
156
to have in the API, because it creates uncertainty going forward with your design and the greater the number of client
157
157
the services have the larger the risk for various interpretations of a given set of input or output and thus the service
158
158
developers themselves are less clear on what the clients may experience as a result of a change.
159
159
160
- ![ The elaborated report on content types] (../sample-reports/designImprovement.png)
160
+ ![ The elaborated report on content types] ( ../sample-reports/designImprovement.png )
161
161
162
162
And:
163
163
164
- ![ The elaborated report on content types] (../sample-reports/pattern_from_null_pot-break.png)
164
+ ![ The elaborated report on content types] ( ../sample-reports/pattern_from_null_pot-break.png )
165
165
166
166
## Opinionated parts
167
167
The opinionated parts are:
0 commit comments