This is my attempt to get the Traits overlay example working with Speakeasy's overlay tooling.
The original example is here.
openapi: 3.1.0
info:
title: API with a paged collection
version: 1.0.0
paths:
/items:
get:
x-oai-traits: ['paged']
responses:
200:
description: OK
overlay: 1.0.0
info:
title: Apply Traits
version: 1.0.0
actions:
- target: $.paths.*.get[[email protected]]
update:
parameters:
- name: top
in: query
schema:
type: integer
- name: skip
in: query
schema:
type: integer
With this change, the errors are resolved but the overlay as written does not work as expected. It appears that the JSON path does not match any location in the document because the OpenAPI is unchanged.
Second try:
Original OpenAPI
Overlay
Here it is in the Overlay Playground: link