Skip to content

Commit ef984a1

Browse files
feat: move to latest generation version
1 parent 772119b commit ef984a1

File tree

4 files changed

+71
-26
lines changed

4 files changed

+71
-26
lines changed
Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
name: Generate
22
permissions:
3-
checks: write
4-
contents: write
5-
pull-requests: write
6-
statuses: write
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
77
"on":
8-
workflow_dispatch:
9-
inputs:
10-
force:
11-
description: Force generation of SDKs
12-
type: boolean
13-
default: false
14-
schedule:
15-
- cron: 0 0 * * *
8+
workflow_dispatch:
9+
inputs:
10+
force:
11+
description: Force generation of SDKs
12+
type: boolean
13+
default: false
14+
schedule:
15+
- cron: 0 0 * * *
1616
jobs:
17-
generate:
18-
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
19-
with:
20-
force: ${{ github.event.inputs.force }}
21-
languages: |
22-
- go
23-
mode: direct
24-
openapi_docs: |
25-
- https://api-docs.bolt.com/api.bundle.yaml
26-
speakeasy_version: 1.210.0
27-
secrets:
28-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
29-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
17+
generate:
18+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
19+
with:
20+
force: ${{ github.event.inputs.force }}
21+
mode: direct
22+
speakeasy_version: latest
23+
secrets:
24+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
25+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.speakeasy/workflow.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
workflowVersion: 1.0.0
2+
sources:
3+
my-source:
4+
inputs:
5+
- location: https://api-docs.bolt.com/api.bundle.yaml
6+
overlays:
7+
- ./default_error_overlay.yaml
8+
targets:
9+
bolt-go:
10+
target: go
11+
source: my-source

default_error_overlay.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Overlay api.bundle.yaml => api.bundle2.yaml
4+
version: 0.0.0
5+
actions:
6+
- target: $["components"]["responses"]["response-4xx"]["content"]["application/json"]["schema"]["oneOf"][0]["$ref"]
7+
update: '#/components/schemas/default_error'
8+
- target: $["components"]["responses"]["response-address-error"]["content"]["application/json"]["schema"]["oneOf"][0]["$ref"]
9+
update: '#/components/schemas/default_error'
10+
- target: $["components"]["responses"]["response-payment-method-error"]["content"]["application/json"]["schema"]["oneOf"][0]["$ref"]
11+
update: '#/components/schemas/default_error'
12+
- target: $["components"]["responses"]["response-payment-error"]["content"]["application/json"]["schema"]["oneOf"][0]["$ref"]
13+
update: '#/components/schemas/default_error'
14+
- target: $["components"]["schemas"]
15+
update:
16+
default_error:
17+
type: object
18+
required:
19+
- .tag
20+
- message
21+
properties:
22+
.tag:
23+
type: string
24+
enum:
25+
- unauthorized
26+
- forbidden
27+
- unprocessable_request
28+
- not_found
29+
description: The type of error returned
30+
example: unprocessable_request
31+
message:
32+
type: string
33+
description: |
34+
A human-readable error message, which might include information specific to
35+
the request that was made.
36+
example: We were unable to process your request.
37+
- target: $["components"]["schemas"]["error"]
38+
remove: true

gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
configVersion: 2.0.0
22
generation:
3-
sdkClassName: Bolt-Typescript-SDK
3+
sdkClassName: Bolt-Go-SDK
44
maintainOpenAPIOrder: true
55
usageSnippets:
66
optionalPropertyRendering: withExample

0 commit comments

Comments
 (0)