Skip to content
Open
Changes from 9 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
38198c9
feat: adds string literal replacement syntax
baywet Feb 18, 2026
74f3a40
feat: adds high level definitions for templates and templates parameters
baywet Feb 18, 2026
2f2fbcc
feat: adds the action template reference object
baywet Feb 18, 2026
77d9e4f
docs: adds an example for the action templates
baywet Feb 18, 2026
5633f57
feat: adds reusable actions to the components
baywet Feb 25, 2026
06a21c9
feat: adds environment variables template
baywet Feb 25, 2026
553fca8
chore: capitalization fixes
baywet Feb 25, 2026
9329227
chore: typo fixes
baywet Feb 25, 2026
d01be1e
fix: case sensitive environment variable
baywet Feb 25, 2026
0b71e07
feat: merges reusable actions
baywet Mar 3, 2026
beeeab0
Merge branch 'feat/action-templates' of https://github.com/baywet/Ove…
baywet Mar 3, 2026
e64846a
fix: updates wording for references definition
baywet Mar 3, 2026
e5be862
Merge branch 'main' into feat/action-templates
baywet Mar 3, 2026
3a58335
fix: aligns wording for the action fields in template and template re…
baywet Mar 3, 2026
d332446
docs: minor fixes for samples mismatches
baywet Mar 31, 2026
b79ed3e
docs: aligns on reusable action terminology
baywet Mar 31, 2026
3ab579e
docs: further alignments on the reusable action terminology
baywet Mar 31, 2026
694f572
Merge branch 'main' into feat/action-templates
baywet Mar 31, 2026
f9802ec
docs: aligns the examples names on the reusable action terminology
baywet Mar 31, 2026
789568c
docs: adds description to the new examples
baywet Mar 31, 2026
d205893
docs: adds important considerations for the reusable actions
baywet Mar 31, 2026
79f81dd
docs: adds precisions in the reusable action object abstract
baywet Mar 31, 2026
edcf47a
docs: adds precision on how to reuse actions in the components section
baywet Mar 31, 2026
35a1e94
feat: adds schema definition for reusable actions
baywet Mar 31, 2026
d692a77
fix: makes actions a oneOf with reusable action reference
baywet Mar 31, 2026
357b742
fix: adds missing parameter values to the schema
baywet Mar 31, 2026
df5ca29
chore: refactors the action definition to avoid having a required tar…
baywet Mar 31, 2026
ef024cf
tests: adds a first set of fail tests for action parameters
baywet Mar 31, 2026
357c782
fix: actions definitions should use the action object not the reusabl…
baywet Mar 31, 2026
1879f2a
tests: adds another batch of pass/fail tests for reusable actions
baywet Mar 31, 2026
1cb9539
tests: additional pass tests for extensions
baywet Mar 31, 2026
ccc453a
fix: pattern validation in the schema
baywet Mar 31, 2026
2ba09b6
tests: adds missing tests for unescaped characters
baywet Mar 31, 2026
b05ab45
tests: increases coverage through additional fail tests
baywet Mar 31, 2026
f0d5536
tests: duplicates additional tests that would be beneficial to earlie…
baywet Mar 31, 2026
6842b95
Merge branch 'main' into feat/action-templates
baywet Apr 1, 2026
f9f5ffa
Merge branch 'main' into feat/action-templates
baywet Apr 1, 2026
f57ce30
Apply suggestions from code review
baywet Apr 6, 2026
e03b60d
chore: feedback updates for a number of tests
baywet Apr 6, 2026
ad8f5e8
fix: allow underscores in parameter names
baywet Apr 6, 2026
569cff0
fix: removes outdated note about optional fields
baywet Apr 6, 2026
c04856d
docs: better representation of the reusable action object
baywet Apr 6, 2026
caade0d
chore: Apply suggestions from code review
baywet Apr 7, 2026
fd729d5
tests: removes duplicate test definition
baywet Apr 7, 2026
7d43013
fix: restrict parameters defaults and values to string
baywet Apr 7, 2026
18ea3ee
fix: restrict the string interpolation syntax to string fields of obj…
baywet Apr 7, 2026
11e4053
fix: adds encoding considerations for keys
baywet Apr 7, 2026
d0d9f75
fix: wording suggestions
baywet Apr 9, 2026
c4d0424
chore: removes inconsistent optional information
baywet Apr 13, 2026
517bc8a
chore: aligns on note syntax
baywet Apr 13, 2026
d2997a7
chore: typo
baywet Apr 13, 2026
37a0efb
fix: moves the reusable action fields into the fields sub-object
baywet Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 285 additions & 1 deletion versions/1.2.0-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ This is the root object of the [Overlay](#overlay).
| <a name="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. |
| <a name="overlay-info"></a>info | [Info Object](#info-object) | **REQUIRED**. Provides metadata about the Overlay. The metadata MAY be used by tooling as required. |
| <a name="overlay-extends"></a>extends | `string` | URI reference that identifies the target document (such as an [[OpenAPI]] document) this overlay applies to. |
| <a name="overlay-actions"></a>actions | [[Action Object](#action-object)] | **REQUIRED** An ordered list of actions to be applied to the target document. The array MUST contain at least one value. |
| <a name="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. |
| <a name="overlay-components"></a>components | [Components Object](#components-object) | A set of components to reuse across the Overlay Document. Optional. |
Comment thread
baywet marked this conversation as resolved.
Outdated

This object MAY be extended with [Specification Extensions](#specification-extensions).

Expand Down Expand Up @@ -128,6 +129,21 @@ The metadata MAY be used by the clients if needed.

This object MAY be extended with [Specification Extensions](#specification-extensions).

#### Components Object

The object provides a set of components to be reused across the Overlay document.

##### Fixed Fields

| Field Name | Type | Description |
| ---- | :----: | ---- |
| <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. |
Comment thread
baywet marked this conversation as resolved.
Outdated
| <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. |

> Note: the target field for components actions is Optional.
Comment thread
baywet marked this conversation as resolved.
Outdated

This object MAY be extended with [Specification Extensions](#specification-extensions).

#### Action Object

This object represents one or more changes to be applied to the target document at the locations defined by the target JSONPath expression.
Expand Down Expand Up @@ -157,6 +173,79 @@ The properties of the `update` or `copy` object MUST be compatible with the targ

This object MAY be extended with [Specification Extensions](#specification-extensions).

#### Action Template Object

This object represents one or more changes to be applied to the target document at the locations defined by the target JSONPath expression and reused in one of more action references.
Comment thread
baywet marked this conversation as resolved.
Outdated

Comment thread
mikekistler marked this conversation as resolved.
##### Fixed fields

| Field Name | Type | Description |
| ---- | :----: | ---- |
| <a name="action-template-parameters"></a>parameters | [[Action template parameter object](#action-template-parameter-object)] | A list of parameters to be used during string literal replacement. Optional. |
| <a name="action-template-environment-variables"></a>environmentVariables | [[Action template parameter object](#action-template-parameter-object)] | A list of environment variables to be used during string literal replacement. Optional. |
| Any field defined in the [action object](#action-object) | mixed | The [string literal replacement syntax](#string-literal-replacement-syntax) MAY be used for any of the fields, and the replacements MUST be evaluated as the template reference is being resolved. |

This object MAY be extended with [Specification Extensions](#specification-extensions).

#### Action Template Parameter Object

##### Fixed fields

| Field Name | Type | Description |
| ---- | :----: | ---- |
| <a name="action-template-parameter-name"></a>name | `string` | **REQUIRED** The name of the parameter, MUST match the key for the string literal replacement expression. |
| <a name="action-template-parameter-default>default | Any | A default value for the parameter to use when no value is provided by the reference. Optional. |


This object MAY be extended with [Specification Extensions](#specification-extensions).

#### Action Reference Object

##### Fixed fields

| Field Name | Type | Description |
| ---- | :----: | ---- |
| <a name="action-reference-ref"></a>$ref | `string` | **REQUIRED** A valid reference to an action in the components section, represented as `#/components/actions/actionTemplateKey`. |
Comment thread
baywet marked this conversation as resolved.
Outdated
| <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. |

#### Action Template Reference Object
Comment thread
baywet marked this conversation as resolved.
Outdated

##### Fixed fields

| Field Name | Type | Description |
| ---- | :----: | ---- |
| <a name="action-template-reference-ref"></a>$ref | `string` | **REQUIRED** A valid reference to an action template in the components section, represented as `#/components/actionTemplates/actionTemplateKey`. |
| <a name="action-template-reference-parameter-values>parameterValues | `Map(string, Any)` | A set of values to use for the template parameters, the key MUST match the parameter name. Optional. |

This object MAY be extended with [Specification Extensions](#specification-extensions).

### String Literal Replacement Syntax

The following string replacement syntax MAY be used:

%source.key%

Where **source** is a known source whose value MUST ONLY be **env** for environment variables, or **param** for parameters. The key MUST only contain the following characters A-Za-z0-9, contain at least one character and start with a letter.

#### ABNF Notation

```abnf
replacement-string = "%" source "." key "%"
source = "env" / "param"
key = ALPHA *( ALPHA / DIGIT )
```

Where ALPHA and DIGIT rules are defined in [[RFC5234]].

#### Environment Replacement Source

When the environment replacement source is used, the key MUST match (case-sensitive) an environment variable defined for the process parsing the Overlay document. If the environment variable is not defined, the processor MAY either replace it with an empty string or return an error.

#### Parameter Replacement Source

When the parameter replacement source is used, the key MUST match (case-sensitive) a corresponding parameter defined for the action template.


### Examples

#### Structured Overlay Example
Expand Down Expand Up @@ -559,6 +648,201 @@ paths:
description: OK
```

##### Action Reference Example

Comment thread
baywet marked this conversation as resolved.
###### Source Description

```yaml
openapi: 3.2.0
info:
title: Example API
version: 1.0.0
paths:
/items:
get:
responses:
200:
description: OK
/some-items:
delete:
responses:
200:
description: OK
```

###### Overlay

```yaml
overlay: 1.2.0
info:
title: Use templates to insert error responses
version: 1.0.0
components:
actions:
errorResponse:
update:
404:
description: Not Found
application/json:
schema:
type: object
properties:
message:
type: string
description: Adds an error response to the %param.pathItem% path item %param.operation% operation
Comment thread
baywet marked this conversation as resolved.
Outdated
actions:
- $ref: '#/components/actions/errorResponse'
target: "$.paths['items'].get.responses"
- $ref: '#/components/actions/errorResponse'
target: "$.paths['some-items'].delete.responses"
```

###### Result Description

```yaml
openapi: 3.2.0
info:
title: Example API
version: 1.0.0
paths:
/items:
get:
responses:
200:
description: OK
404:
description: Not Found
application/json:
schema:
type: object
properties:
errorMessage:
type: string
/some-items:
delete:
responses:
200:
description: OK
404:
description: Not Found
application/json:
schema:
type: object
properties:
deleteErrorMessage:
type: string
```

##### Action Template Example

Comment thread
baywet marked this conversation as resolved.
###### Source Description

```yaml
openapi: 3.2.0
info:
title: Example API
version: 1.0.0
paths:
/items:
get:
responses:
200:
description: OK
/some-items:
delete:
responses:
200:
description: OK
```

###### Overlay

```yaml
overlay: 1.2.0
info:
title: Use templates to insert error responses
version: 1.0.0
components:
actionTemplates:
Comment thread
baywet marked this conversation as resolved.
Outdated
errorResponse:
target: "$.paths['%param.pathItem%'].%param.operation%.responses"
Comment thread
baywet marked this conversation as resolved.
Outdated
update:
404:
description: Not Found
application/json:
schema:
type: object
properties:
'%param.propertyName%':
type: string
stageName:
type: string
const: '%env.stageName%'
description: Adds an error response to the %param.pathItem% path item %param.operation% operation
parameters:
- name: pathItem
- name: operation
default: get
- name: propertyName
default: errorMessage
environmentVariables:
- name: stageName
default: dev
actions:
- $ref: '#/components/actionTemplates/errorResponse'
Comment thread
baywet marked this conversation as resolved.
Outdated
parameterValues:
pathItem: '/items'
- $ref: '#/components/actionTemplates/errorResponse'
Comment thread
baywet marked this conversation as resolved.
Outdated
parameterValues:
pathItem: '/some-items'
operation: delete
propertyName: deleteErrorMessage
```

> Note: in this example, no value is set for the process environment variable "stageName".
Comment thread
baywet marked this conversation as resolved.
Outdated

###### Result Description

```yaml
openapi: 3.2.0
info:
title: Example API
version: 1.0.0
paths:
/items:
get:
responses:
200:
description: OK
404:
description: Not Found
application/json:
schema:
type: object
properties:
errorMessage:
type: string
stageName:
type: string
const: dev
/some-items:
delete:
responses:
200:
description: OK
404:
description: Not Found
application/json:
schema:
type: object
properties:
deleteErrorMessage:
type: string
stageName:
type: string
const: dev
```

### Specification Extensions

While the Overlay Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.
Expand Down