Skip to content

Commit cd2e40c

Browse files
Merge pull request #2575 from openshift-cloud-team/agents-group-versions
AGENTS: Using API_GROUP_VERSIONS generates incorrect openapi
2 parents a31c77f + d6c1f0f commit cd2e40c

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

AGENTS.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,23 @@ When working on a specific API group/version, you can regenerate only the affect
3737

3838
```bash
3939
# Regenerate CRDs for a specific API group/version
40-
make update-codegen-crds API_GROUP_VERSIONS=operator.openshift.io/v1alpha1
41-
make update-codegen-crds API_GROUP_VERSIONS=config.openshift.io/v1
42-
make update-codegen-crds API_GROUP_VERSIONS=route.openshift.io/v1
40+
make update-codegen API_GROUP_VERSIONS=operator.openshift.io/v1alpha1
41+
make update-codegen API_GROUP_VERSIONS=config.openshift.io/v1
42+
make update-codegen API_GROUP_VERSIONS=route.openshift.io/v1
4343

4444
# Multiple API groups can be specified with comma separation
45-
make update-codegen-crds API_GROUP_VERSIONS=operator.openshift.io/v1alpha1,config.openshift.io/v1
45+
make update-codegen API_GROUP_VERSIONS=operator.openshift.io/v1alpha1,config.openshift.io/v1
4646
```
4747

48-
This is more efficient than running `make update` (which regenerates all CRDs) when you're only working on specific API groups.
48+
**Important:** While using `API_GROUP_VERSIONS` is faster for iteration (e.g., when developing tests),
49+
it generates invalid OpenAPI data. This targeted generation is useful during development cycles, but you
50+
**must run `make update`** (without `API_GROUP_VERSIONS`) to regenerate all files correctly before
51+
committing changes. The full `make update` ensures all generated files, including OpenAPI schemas, are
52+
properly synchronized.
53+
54+
**Workflow:**
55+
- During iteration: `make update-codegen API_GROUP_VERSIONS=your.group/v1` (fast feedback)
56+
- Before committing: `make update` (ensures correctness)
4957

5058
### Testing
5159
```bash

0 commit comments

Comments
 (0)