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/1.2.0-dev.md
+98-1Lines changed: 98 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ This is the root object of the [Overlay](#overlay).
84
84
| <aname="overlay-version"></a>overlay |`string`|**REQUIRED**. This string MUST be the [version number](#versions) of the Overlay Specification that the Overlay document uses. The `overlay` field SHOULD be used by tooling to interpret the Overlay document. |
85
85
| <aname="overlay-info"></a>info |[Info Object](#info-object)|**REQUIRED**. Provides metadata about the Overlay. The metadata MAY be used by tooling as required. |
86
86
| <aname="overlay-extends"></a>extends |`string`| URI reference that identifies the target document (such as an [[OpenAPI]] document) this overlay applies to. |
87
-
| <aname="overlay-actions"></a>actions |[[Action Object](#action-object) or [Action Template Reference Object](#action-template-reference-object)]|**REQUIRED** An ordered list of actions to be applied to the target document. The array MUST contain at least one value. |
87
+
| <aname="overlay-actions"></a>actions |[[Action Object](#action-object) or [Action Template Reference Object](#action-template-reference-object) or [Action Reference Object](#action-reference-object)]|**REQUIRED** An ordered list of actions to be applied to the target document. The array MUST contain at least one value. |
88
88
| <aname="overlay-components"></a>components |[Component Object](#component-object)| A set of components to reuse across the Overlay Document. Optional. |
89
89
90
90
This object MAY be extended with [Specification Extensions](#specification-extensions).
@@ -138,6 +138,9 @@ The object provides a set of components to be reused across the Overlay document
138
138
| Field Name | Type | Description |
139
139
| ---- | :----: | ---- |
140
140
| <a name="component-action-templates"></a>actionTemplates | Map(`string`, [Action Template Object](#action-template-object)) | A key-value set of action templates to reference in the actions. Optional. |
141
+
| <a name="component-actions"></a>actions | Map(`string`, [Action Object](#action-object) or [Action Template Reference Object](#action-template-reference-object)) | A key-value set of actions or action template references to use in the actions. Optional. |
142
+
143
+
> Note: the target field for components actions is Optional.
141
144
142
145
This object MAY be extended with [Specification Extensions](#specification-extensions).
143
146
@@ -195,6 +198,15 @@ This object MAY be extended with [Specification Extensions](#specification-exten
195
198
196
199
This object MAY be extended with [Specification Extensions](#specification-extensions).
197
200
201
+
#### Action reference object
202
+
203
+
##### Fixed fields
204
+
205
+
| Field Name | Type | Description |
206
+
| ---- | :----: | ---- |
207
+
| <a name="action-reference-ref"></a>$ref | `string` | **REQUIRED** A valid reference to an action in the components section, represented as `#/components/actions/actionTemplateKey`. |
208
+
| <a name="action-reference-target"></a>target | `string` | A RFC9535 JSONPath query expression selecting nodes in the target document and overrides the target defined in the referenced action. Optional when the resolved action defines a target, required when the resolved action does not. |
209
+
198
210
#### Action template reference object
199
211
200
212
##### Fixed fields
@@ -635,6 +647,91 @@ paths:
635
647
description: OK
636
648
```
637
649
650
+
##### Action Reference Example
651
+
652
+
###### Source Description
653
+
654
+
```yaml
655
+
openapi: 3.2.0
656
+
info:
657
+
title: Example API
658
+
version: 1.0.0
659
+
paths:
660
+
/items:
661
+
get:
662
+
responses:
663
+
200:
664
+
description: OK
665
+
/some-items:
666
+
delete:
667
+
responses:
668
+
200:
669
+
description: OK
670
+
```
671
+
672
+
###### Overlay
673
+
674
+
```yaml
675
+
overlay: 1.2.0
676
+
info:
677
+
title: Use templates to insert error responses
678
+
version: 1.0.0
679
+
components:
680
+
actions:
681
+
errorResponse:
682
+
update:
683
+
404:
684
+
description: Not Found
685
+
application/json:
686
+
schema:
687
+
type: object
688
+
properties:
689
+
message:
690
+
type: string
691
+
description: Adds an error response to the %param.pathItem% path item %param.operation% operation
0 commit comments