Skip to content

Commit 1496e07

Browse files
authored
Merge pull request #3806 from handrews/undef-impdef-320
Define "undefined" and "implementation-defined" (3.2.0 port of #3779)
2 parents 44da621 + 6e76545 commit 1496e07

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

versions/3.2.0.md

+13
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ Some examples of possible media type definitions:
9999
The HTTP Status Codes are used to indicate the status of the executed operation.
100100
The available status codes are defined by [RFC7231](https://tools.ietf.org/html/rfc7231#section-6) and registered status codes are listed in the [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml).
101101

102+
##### <a name="undefinedAndImplementationDefinedBehavior"></a>Undefined and Implementation-Defined Behavior
103+
104+
This specification deems certain situations to have either _undefined_ or _implementation-defined_ behavior.
105+
106+
Behavior described as _undefined_ is likely, at least in some circumstances, to result in outcomes that contradict the specification.
107+
This description is used when detecting the contradiction is impossible or impractical.
108+
Implementations MAY support undefined scenarios for historical reasons, including ambiguous text in prior versions of the specification.
109+
This support might produce correct outcomes in many cases, but relying on it is NOT RECOMMENDED as there is no guarantee that it will work across all tools or with future specification versions, even if those versions are otherwise strictly compatible with this one.
110+
111+
Behavior described as _implementation-defined_ allows implementations to choose which of several different-but-compliant approaches to a requirement to implement.
112+
This documents ambiguous requirements that API description authors are RECOMMENDED to avoid in order to maximize interoperability.
113+
Unlike undefined behavior, it is safe to rely on implementation-defined behavior if _and only if_ it can be guaranteed that all relevant tools support the same behavior.
114+
102115
## Specification
103116

104117
### Versions

0 commit comments

Comments
 (0)