Skip to content

Commit ab3c453

Browse files
author
Nishu Goel
committed
Speakeasy migrate workflows & Suppress diff for readonly fields in save file payload
1 parent 4ebfc15 commit ab3c453

File tree

28 files changed

+1505
-416
lines changed

28 files changed

+1505
-416
lines changed
Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
name: Generate
2-
3-
on:
4-
workflow_dispatch: # Allows manual triggering of the workflow to generate SDK
5-
inputs:
6-
force:
7-
description: "Force generation of SDKs"
8-
type: boolean
9-
default: false
10-
schedule:
11-
- cron: 0 0 * * * # Runs every day at midnight
12-
2+
"on":
3+
workflow_dispatch:
4+
inputs:
5+
force:
6+
description: Force generation of SDKs
7+
type: boolean
8+
default: false
9+
schedule:
10+
- cron: 0 0 * * *
1311
jobs:
14-
generate:
15-
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
16-
with:
17-
speakeasy_version: latest
18-
openapi_docs: |
19-
- https://docs.api.epilot.io/file.yaml
20-
overlay_docs: |
21-
- ./overlay.yaml
22-
languages: |
23-
- terraform
24-
mode: pr
25-
force: ${{ github.event.inputs.force }}
26-
secrets:
27-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
28-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
12+
generate:
13+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
14+
with:
15+
force: ${{ github.event.inputs.force }}
16+
mode: pr
17+
speakeasy_version: latest
18+
secrets:
19+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
20+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.speakeasy/gen.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 11c8545a-deb6-44f9-ba56-e71722af6a51
33
management:
4-
docChecksum: 1c56c7ca8bb88e9f3f0a7643ee3863a4
4+
docChecksum: 0383a3b8b71da53f168ab4cd3da53caa
55
docVersion: 0.2.0
6-
speakeasyVersion: 1.396.7
7-
generationVersion: 2.415.6
8-
releaseVersion: 0.4.2
9-
configChecksum: 122c582ae34924cbbbf36d5bcaf65981
6+
speakeasyVersion: 1.422.1
7+
generationVersion: 2.438.15
8+
releaseVersion: 0.5.0
9+
configChecksum: 166ca9b280afae98c5bf4536bf99033d
1010
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-file.git
1111
repoSubDirectory: .
1212
published: true
@@ -15,10 +15,10 @@ features:
1515
additionalDependencies: 0.1.0
1616
additionalProperties: 0.1.2
1717
constsAndDefaults: 0.1.4
18-
core: 3.24.11
18+
core: 3.25.0
1919
deprecations: 2.81.1
2020
envVarSecurityUsage: 0.1.0
21-
globalSecurity: 2.81.8
21+
globalSecurity: 2.81.9
2222
globalServerURLs: 2.82.1
2323
inputOutputModels: 2.83.0
2424
nullables: 0.0.0
@@ -171,7 +171,7 @@ examples:
171171
application/json: {"filename": "document.pdf", "index_tag": "2f6a377c8e78", "metadata": {"color": "blue"}, "mime_type": "application/pdf"}
172172
responses:
173173
"201":
174-
application/json: {"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", "s3ref": {"bucket": "epilot-prod-user-content", "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}, "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"}
174+
application/json: {"public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf", "s3ref": {"bucket": "epilot-prod-user-content", "key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}, "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"}
175175
deleteFile:
176176
speakeasy-default-delete-file:
177177
parameters:

.speakeasy/workflow.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
workflowVersion: 1.0.0
2+
sources:
3+
my-source:
4+
inputs:
5+
- location: https://docs.api.epilot.io/file.yaml
6+
targets:
7+
terraform:
8+
target: terraform
9+
source: my-source

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
all: speakeasy docs
33

44
original.yaml:
5-
curl https://docs.api.epilot.io/file.yaml > original.yaml
6-
# cp openapi.yml original.yaml
5+
#curl https://docs.api.epilot.io/file.yaml > original.yaml
6+
cp openapi.yml original.yaml
77

88
original_modified.yaml: original.yaml overlay.yaml
99
speakeasy overlay apply -s original.yaml -o overlay.yaml > original_modified.yaml
@@ -13,8 +13,8 @@ overlay.yaml:
1313

1414
speakeasy:
1515
$(eval TMP := $(shell mktemp -d))
16-
curl https://docs.api.epilot.io/file.yaml > $(TMP)/openapi.yaml
17-
# cp openapi.yml $(TMP)/openapi.yaml
16+
#curl https://docs.api.epilot.io/file.yaml > $(TMP)/openapi.yaml
17+
cp openapi.yml $(TMP)/openapi.yaml
1818
speakeasy overlay apply -s $(TMP)/openapi.yaml -o overlay.yaml > $(TMP)/final.yaml
1919
speakeasy generate sdk --lang terraform -o . -s $(TMP)/final.yaml
2020

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ terraform {
5959
required_providers {
6060
epilot-file = {
6161
source = "epilot-dev/epilot-file"
62-
version = "0.4.2"
62+
version = "0.5.0"
6363
}
6464
}
6565
}

docs/data-sources/file.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ File DataSource
1414

1515
```terraform
1616
data "epilot-file_file" "my_file" {
17+
async = true
1718
id = "ef7d985c-2385-44f4-9c71-ae06a52264f8"
18-
strict = true
19+
strict = false
1920
}
2021
```
2122

@@ -24,6 +25,7 @@ data "epilot-file_file" "my_file" {
2425

2526
### Optional
2627

28+
- `async` (Boolean) Don't wait for updated entity to become available in Search API. Useful for large migrations
2729
- `strict` (Boolean) When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional`
2830

2931
### Read-Only

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
epilot-file = {
1919
source = "epilot-dev/epilot-file"
20-
version = "0.4.2"
20+
version = "0.5.0"
2121
}
2222
}
2323
}

docs/resources/file.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ resource "epilot-file_file" "my_file" {
3030
additional = {
3131
"see" : jsonencode("documentation"),
3232
}
33+
async = true
3334
custom_download_url = "https://some-api-url.com/download?file_id=123"
3435
filename = "document.pdf"
3536
fill_activity = true
@@ -46,7 +47,7 @@ resource "epilot-file_file" "my_file" {
4647
key = "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
4748
}
4849
source_url = "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
49-
strict = true
50+
strict = false
5051
tags = [
5152
"..."
5253
]
@@ -64,6 +65,7 @@ resource "epilot-file_file" "my_file" {
6465
- `acl` (Attributes) Access control list (ACL) for an entity. Defines sharing access to external orgs or users. (see [below for nested schema](#nestedatt--acl))
6566
- `activity_id` (String) Activity to include in event feed
6667
- `additional` (Map of String) Additional fields that are not part of the schema
68+
- `async` (Boolean) Don't wait for updated entity to become available in Search API. Useful for large migrations. Default: false
6769
- `custom_download_url` (String) Custom external download url used for the file
6870
- `filename` (String)
6971
- `fill_activity` (Boolean) Update the diff and entity for the custom activity included in the query.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
data "epilot-file_file" "my_file" {
2+
async = true
23
id = "ef7d985c-2385-44f4-9c71-ae06a52264f8"
3-
strict = true
4+
strict = false
45
}

examples/provider/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
epilot-file = {
44
source = "epilot-dev/epilot-file"
5-
version = "0.4.2"
5+
version = "0.5.0"
66
}
77
}
88
}

0 commit comments

Comments
 (0)