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
Let's dig into the JSON Path RFC RFC 9535 to see if we can understand this, specifically the section on Filter Selectors.
Okay ... so filter selectors should work on objects ... but how do they work?
So for objects, the filter is deciding which members of the object are selected, NOT which objects are selected based on its members. WOW.
Later (Section 2.3.5.2) it says:
I think this confirms it -- filters select member values of an object, NOT the objects themselves.