You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When we generate an OpenAPI document, we use an OptionsMonitor to retrieve OpenAPI options which are stored with a key equal the requested document name.
49
+
// This key is case-sensitive. If the document doesn't exist, the options monitor return a default instance, in which the OpenAPI version is set to v3.
50
+
// This could cause bugs! You'd get your document, but depending on the casing you used in the document name you passed to the function, you'll receive different OpenAPI document versions.
51
+
// We want to prevent this from happening. Therefore:
52
+
// By setting up a v2 document on the "casesensitive" route and requesting it on "CaseSensitive",
53
+
// we can test that the we've configured the options monitor to retrieve the options in a case-insensitive manner.
54
+
// If it is case-sensitive, it would return a default instance with OpenAPI version v3, which would cause this test to fail!
55
+
// However, if it would return the v2 instance, which was configured on the lowercase - case-insensitive - documentname, the test would pass!
0 commit comments