Skip to content

Commit

Permalink
Revert "chore: revert "feat: jsonpath upgrade, new default module for…
Browse files Browse the repository at this point in the history
…mat for ts (#1230)" (unexpected additional changes)"

This reverts commit ca15aa3.
  • Loading branch information
ThomasRooney committed Jan 27, 2025
1 parent 88ba0b6 commit d61e5ff
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 37 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ require (
github.com/pkg/errors v0.9.1
github.com/sethvargo/go-githubactions v1.1.0
github.com/speakeasy-api/huh v1.1.2
github.com/speakeasy-api/openapi-generation/v2 v2.495.1
github.com/speakeasy-api/openapi-overlay v0.9.0
github.com/speakeasy-api/openapi-generation/v2 v2.496.0
github.com/speakeasy-api/openapi-overlay v0.10.0
github.com/speakeasy-api/sdk-gen-config v1.30.1
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.19.1
github.com/speakeasy-api/speakeasy-core v0.17.7
github.com/speakeasy-api/speakeasy-core v0.18.0
github.com/speakeasy-api/speakeasy-proxy v0.0.2
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand Down Expand Up @@ -225,7 +225,7 @@ require (
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/sourcegraph/jsonrpc2 v0.2.0 // indirect
github.com/speakeasy-api/easytemplate v0.11.1 // indirect
github.com/speakeasy-api/jsonpath v0.1.1 // indirect
github.com/speakeasy-api/jsonpath v0.5.2 // indirect
github.com/speakeasy-api/speakeasy-go-sdk v1.8.1 // indirect
github.com/speakeasy-api/speakeasy-schemas v1.3.0 // indirect
github.com/spewerspew/spew v0.0.0-20230513223542-89b69fbbe2bd // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -571,22 +571,22 @@ github.com/speakeasy-api/easytemplate v0.11.1 h1:YGEPoldsiXcfhPWN/12B2m78+67RhuF
github.com/speakeasy-api/easytemplate v0.11.1/go.mod h1:C2px2dvDShpIVSMy6IjKymMNHMHWKv/wngLsf9bLHkA=
github.com/speakeasy-api/huh v1.1.2 h1:5unC7BZBwq35D45ZUMnNPdiK4c+yFsGFQcnsfNHZ+wA=
github.com/speakeasy-api/huh v1.1.2/go.mod h1:iBavR3Ieq/4upEcdq+VXQyeShcoC9cOhsQbhc/cMuLU=
github.com/speakeasy-api/jsonpath v0.1.1 h1:79gtq+zHYPe9dR1urEwl/PPsvP9nMRTGG1xHR62pM24=
github.com/speakeasy-api/jsonpath v0.1.1/go.mod h1:Py01TnxRUMhC0/FT954KBiaDY2/kaZv3QMc8JxQaVys=
github.com/speakeasy-api/jsonpath v0.5.2 h1:6cn/KuJCOwN5tz6xPNW64/4lyWeYnpa71FoXELOiaR0=
github.com/speakeasy-api/jsonpath v0.5.2/go.mod h1:ymb2iSkyOycmzKwbEAYPJV/yi2rSmvBCLZJcyD+VVWw=
github.com/speakeasy-api/libopenapi v0.0.0-20241006201546-c9e5f704a939 h1:LGtzWUvGEZyMSZW34RHqE85HBsGRYgYP7L7Hh+4FSP4=
github.com/speakeasy-api/libopenapi v0.0.0-20241006201546-c9e5f704a939/go.mod h1:9ap4lXBHgxGyFwxtOfa+B1C3IQ0rvnqteqjJvJ11oiQ=
github.com/speakeasy-api/openapi v0.1.6 h1:bpBiJ9P4hSVv2Vddk+ny6zeytPsDq0ttxl6DLAwC0zo=
github.com/speakeasy-api/openapi v0.1.6/go.mod h1:t1HA3wPC8jpGRr0UHW+SIvIB8dT5RXXi39XLrIG/URU=
github.com/speakeasy-api/openapi-generation/v2 v2.495.1 h1:HlJyCPUC52300ljL0ZI+6V/mLyBGNG+oDqroYgrLDDQ=
github.com/speakeasy-api/openapi-generation/v2 v2.495.1/go.mod h1:UfxZg41QiMEatXCSx7ILW4ErOHMlgGEAlJeSVxf5AZo=
github.com/speakeasy-api/openapi-overlay v0.9.0 h1:Wrz6NO02cNlLzx1fB093lBlYxSI54VRhy1aSutx0PQg=
github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5h6dxrHjVVByWKh7an8TRc=
github.com/speakeasy-api/openapi-generation/v2 v2.496.0 h1:J0XNsxJ2nu4XadxTqOg7aZF7vl6VMJ6zn3UXRweexEU=
github.com/speakeasy-api/openapi-generation/v2 v2.496.0/go.mod h1:vHpweClI3PavKiYd2hnp7TcUrGZ/70FKamRvlY4gfDY=
github.com/speakeasy-api/openapi-overlay v0.10.0 h1:bKZf5Q7PH3yAhisMc+Ys6MT2InLaeQ2Qc3s9L/hNe2s=
github.com/speakeasy-api/openapi-overlay v0.10.0/go.mod h1:G1/j/DhHFIA84/nrA4hDSCFBWq9EofloucjiQoMbh5M=
github.com/speakeasy-api/sdk-gen-config v1.30.1 h1:61gH9i7ZRL2FDpPIkYMY+PmuQjnvUhhBuLTJp8FrNIU=
github.com/speakeasy-api/sdk-gen-config v1.30.1/go.mod h1:e9PjnCRHGa4K4EFKVU+kKmihOZjJ2V4utcU+274+bnQ=
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.19.1 h1:oW7UzM+ECowRsrFAtaGuQOwReHZ2kM8Nxwz+rSpNmA0=
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.19.1/go.mod h1:k9JD6Rj0+Iizc5COoLZHyRIOGGITpKZ2qBuFFO8SqNI=
github.com/speakeasy-api/speakeasy-core v0.17.7 h1:pdZFwUdVZR7lijXfycBWiPaew/An3meuA9V+7Fn652c=
github.com/speakeasy-api/speakeasy-core v0.17.7/go.mod h1:dcOonEbVwua1xepsY38rvOSqwzJmz2Al9zbUrTIGREM=
github.com/speakeasy-api/speakeasy-core v0.18.0 h1:xVNfPYajlYO3o1HJcsD0YFEC/880/wqCmJntE1N0LTk=
github.com/speakeasy-api/speakeasy-core v0.18.0/go.mod h1:28RDcRmLSMS2fG/mkR6+neb/41bgc7XBfuoLifpduCY=
github.com/speakeasy-api/speakeasy-go-sdk v1.8.1 h1:atzohw12oQ5ipaLb1q7ntTu4vvAgKDJsrvaUoOu6sw0=
github.com/speakeasy-api/speakeasy-go-sdk v1.8.1/go.mod h1:XbzaM0sMjj8bGooz/uEtNkOh1FQiJK7RFuNG3LPBSAU=
github.com/speakeasy-api/speakeasy-proxy v0.0.2 h1:u4rQ8lXvuYRCSxiLQGb5JxkZRwNIDlyh+pMFYD6OGjA=
Expand Down
2 changes: 1 addition & 1 deletion integration/resources/overlay/overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ actions:
update:
- name: Testing
description: just a description
- target: $.paths["/anything/selectGlobalServer"].x-my-ignore
- target: $.paths["/anything/selectGlobalServer"]["x-my-ignore"]
update:
servers:
- url: http://localhost:35123
Expand Down
33 changes: 30 additions & 3 deletions pkg/overlay/testdata/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,37 @@
"description": "Some test description.\nAbout our test document."
},
"paths": {
"/anything/selectGlobalServer": {
"/anything/ignored": {
"x-my-ignore": true,
"get": {
"operationId": "selectGlobalServer",
"operationId": "iAmIgnored",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Optional-Header": {
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "./components.yaml#/components/schemas/Products"
}
}
}
}
}
}
},
"/anything/not-ignored": {
"get": {
"operationId": "iAmSelected",
"responses": {
"200": {
"description": "OK",
Expand All @@ -36,4 +63,4 @@
}
}
}
}
}
20 changes: 18 additions & 2 deletions pkg/overlay/testdata/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,26 @@ info:
Some test description.
About our test document.
paths:
/anything/selectGlobalServer:
/anything/ignored:
x-my-ignore: true
get:
operationId: selectGlobalServer
operationId: iAmIgnored
responses:
"200":
description: OK
headers:
X-Optional-Header:
schema:
type: string
"404":
description: Not found
content:
application/json:
schema:
$ref: "./components.yaml#/components/schemas/Products"
/anything/not-ignored:
get:
operationId: iAmSelected
responses:
"200":
description: OK
Expand Down
38 changes: 29 additions & 9 deletions pkg/overlay/testdata/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,37 @@
"description": "Some test description.\nAbout our test document."
},
"paths": {
"/anything/selectGlobalServer": {
"x-my-ignore": {
"servers": [
{
"url": "http://localhost:35123",
"description": "The default server."
"/anything/ignored": {
"x-my-ignore": true,
"get": {
"operationId": "iAmIgnored",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Optional-Header": {
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "./components.yaml#/components/schemas/Products"
}
}
}
}
]
},
}
}
},
"/anything/not-ignored": {
"get": {
"operationId": "selectGlobalServer",
"operationId": "iAmSelected",
"responses": {
"200": {
"description": "OK",
Expand Down
25 changes: 19 additions & 6 deletions pkg/overlay/testdata/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@ info:
Some test description.
About our test document.
paths:
/anything/selectGlobalServer:
x-my-ignore:
servers:
- url: http://localhost:35123
description: The default server.
/anything/ignored:
x-my-ignore: true
get:
operationId: iAmIgnored
responses:
"200":
description: OK
headers:
X-Optional-Header:
schema:
type: string
"404":
description: Not found
content:
application/json:
schema:
$ref: "./components.yaml#/components/schemas/Products"
/anything/not-ignored:
get:
operationId: selectGlobalServer
operationId: iAmSelected
responses:
"200":
description: OK
Expand Down
21 changes: 18 additions & 3 deletions pkg/overlay/testdata/expectedWrapped.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,25 @@ info:
summary: "Test Summary"
description: "Some test description.\nAbout our test document."
paths:
"/anything/selectGlobalServer":
x-my-ignore: {"servers": [{"url": "http://localhost:35123", "description": "The default server."}]}
"/anything/ignored":
x-my-ignore: true
get:
operationId: "selectGlobalServer"
operationId: "iAmIgnored"
responses:
"200":
description: "OK"
headers:
"X-Optional-Header":
schema:
type: "string"
"404":
description: "Not found"
content:
"application/json":
schema: {"$ref": "./components.yaml#/components/schemas/Products"}
"/anything/not-ignored":
get:
operationId: "iAmSelected"
responses:
"200":
description: "OK"
Expand Down
2 changes: 1 addition & 1 deletion pkg/overlay/testdata/overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ info:
title: Overlay
version: 0.0.0
actions:
- target: $.paths.*.*[?([email protected])]
- target: $.paths[?!@["x-my-ignore"]].*
update:
servers:
- url: http://localhost:35123
Expand Down

0 comments on commit d61e5ff

Please sign in to comment.