Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.24
require (
github.com/pmezard/go-difflib v1.0.0
github.com/stretchr/testify v1.11.1
go.yaml.in/yaml/v4 v4.0.0-rc.4
go.yaml.in/yaml/v4 v4.0.0-rc.5
)

require (
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.yaml.in/yaml/v4 v4.0.0-rc.4 h1:UP4+v6fFrBIb1l934bDl//mmnoIZEDK0idg1+AIvX5U=
go.yaml.in/yaml/v4 v4.0.0-rc.4/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
go.yaml.in/yaml/v4 v4.0.0-rc.5 h1:JVliQq9EGOYaTgMi+k8BhUJyqcGk4ZqeuiN1Cirba9c=
go.yaml.in/yaml/v4 v4.0.0-rc.5/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
18 changes: 12 additions & 6 deletions pkg/overlay/testdata/openapi-overlayed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ paths:
get:
operationId: listIngredients
summary: Get a list of ingredients.
description: Get a list of ingredients, if authenticated this will include stock levels and product codes otherwise it will only include public information.
description: Get a list of ingredients, if authenticated this will include stock
levels and product codes otherwise it will only include public information.
tags:
- ingredients
parameters:
- name: ingredients
in: query
description: A list of ingredients to filter by. If not provided all ingredients will be returned.
description: A list of ingredients to filter by. If not provided all ingredients
will be returned.
required: false
style: form
explode: false
Expand Down Expand Up @@ -180,7 +182,8 @@ paths:
"{$request.query.callback_url}":
post:
summary: Receive order updates.
description: Receive order updates from the supplier, this will be called whenever the status of an order changes.
description: Receive order updates from the supplier, this will be called
whenever the status of an order changes.
tags:
- orders
requestBody:
Expand Down Expand Up @@ -234,7 +237,8 @@ webhooks:
stockUpdate:
post:
summary: Receive stock updates.
description: Receive stock updates from the bar, this will be called whenever the stock levels of a drink or ingredient changes.
description: Receive stock updates from the bar, this will be called whenever
the stock levels of a drink or ingredient changes.
tags:
- drinks
- ingredients
Expand Down Expand Up @@ -295,7 +299,8 @@ components:
- 1200 # $12.00
- 1500 # $15.00
stock:
description: The number of units of the drink in stock, only available when authenticated.
description: The number of units of the drink in stock, only available when
authenticated.
type: integer
readOnly: true
productCode:
Expand Down Expand Up @@ -331,7 +336,8 @@ components:
type:
$ref: "#/components/schemas/IngredientType"
stock:
description: The number of units of the ingredient in stock, only available when authenticated.
description: The number of units of the ingredient in stock, only available
when authenticated.
type: integer
examples:
- 10
Expand Down
3 changes: 2 additions & 1 deletion pkg/overlay/testdata/overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ actions:
update:
x-drop: true
- target: $.paths.*[?length(@.tags[?(@ == "dont-add-x-drop-false")]) > 0]
description: 'add x-drop: false to any operation which has the dont-add-x-drop-false tag'
description: 'add x-drop: false to any operation which has the dont-add-x-drop-false
tag'
update:
x-drop: false