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
Copy file name to clipboardExpand all lines: versions/3.1.1.md
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -225,6 +225,9 @@ The interface approach can also work for Discriminator Objects and Schema Object
225
225
There are no URI-based alternatives for the Security Requirement Object or for the Operation Object's `tags` field.
226
226
These limitations are expected to be addressed in a future release.
227
227
228
+
See [Security Requirement in a Referenced Document](#security-requirement-in-a-referenced-document) for an example of the possible resolutions, including which one is recommended by this section.
229
+
The behavior for Discrimator Object non-URI mappings and for the Operation Object's `tags` field operate on the same principles.
230
+
228
231
Note that no aspect of implicit connection resolution changes how [URIs are resolved](#relativeReferencesURI), or restricts their possible targets.
229
232
230
233
### <aname="dataTypes"></a>Data Types
@@ -3826,6 +3829,41 @@ security:
3826
3829
- read:pets
3827
3830
```
3828
3831
3832
+
###### Security Requirement in a Referenced Document
3833
+
3834
+
See [Resolving Implicit Connections](#resolvingImplicitConnections) for more information.
3835
+
3836
+
Entry document `openapi.yaml`:
3837
+
3838
+
```YAML
3839
+
components:
3840
+
securitySchemes:
3841
+
MySecurity:
3842
+
type: http
3843
+
scheme: bearer
3844
+
bearerFormat: JWT
3845
+
paths:
3846
+
/foo:
3847
+
$ref: "other.yaml#/components/pathItems/Foo"
3848
+
```
3849
+
3850
+
Referenced document `other.yaml`:
3851
+
3852
+
```YAML
3853
+
components:
3854
+
securitySchemes:
3855
+
MySecurity:
3856
+
type: http
3857
+
scheme: basic
3858
+
pathItems:
3859
+
Foo:
3860
+
get:
3861
+
security:
3862
+
- MySecurity: []
3863
+
```
3864
+
3865
+
In this example, it is implementation-defined whether the Security Requirement for "MySecurity" in `other.yaml` resolves to `other.yaml#/components/securitySchemes/MySecurity` or the RECOMMENDED resolved ___location of `openapi.yaml#/components/securitySchemes/MySecurity`.
0 commit comments