You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [1.4] Add a github workflow for build + vet
* [1.5] Add make command to build/test the generator
* [1.6] Create testdata/fixtures with README
* root formatting fixes
* updated 1.4 to any branch and added go depencency files to paths
Curated test inputs for the `tfgen` end-to-end suite. Each fixture is a self-contained directory holding everything needed to drive the generator and assert on its output: an OpenAPI input spec and the expected golden code the generator should produce from it.
4
+
5
+
The E2E suite runs `tfgen` against a fixture's `openapi.yaml` and compares the result against the committed `out/` directory. Each fixture therefore exercises one specific generator capability end to end.
6
+
7
+
## Layout
8
+
9
+
Each fixture is a directory under this one:
10
+
11
+
```
12
+
<fixture_name>/
13
+
├── openapi.yaml # Input spec with x-datadog-tf-generator annotations
14
+
├── out/ # Expected golden output (committed)
15
+
│ └── *.go
16
+
└── README.md # (optional) what this fixture exercises
17
+
```
18
+
19
+
-**`openapi.yaml`** — the OpenAPI spec the generator reads. The resources and data sources to generate are marked with the `x-datadog-tf-generator` extension.
20
+
-**`out/`** — the golden output: the `.go` files the generator is expected to emit. These are committed and diffed against on every run. When generator behavior changes intentionally, regenerate this directory and review the diff by hand.
21
+
-**`README.md`***(optional)* — a short note describing the capability the fixture targets (e.g. a particular schema shape, a hook, or an error path).
22
+
23
+
## Naming
24
+
25
+
Name each fixture after the artifact it generates so the catalogue reads as a list of capabilities:
26
+
27
+
-`data_source_<name>` — a generated data source (e.g. `data_source_pet`).
28
+
-`resource_<name>` — a generated resource.
29
+
- Append a distinguishing suffix when a fixture targets a variant or edge case (e.g. `data_source_team_with_hooks`, `broken_hook_signature`).
30
+
31
+
> [!NOTE]
32
+
> This catalogue is currently empty. Fixtures are added in later phases as the corresponding generator capabilities land.
0 commit comments