Skip to content

Commit f8cd4c8

Browse files
Add regeneration instructions to README
Co-authored-by: Jay Hack <jay@codegen.com>
1 parent 45e97ce commit f8cd4c8

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

README.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,60 @@
11
# codegen-api-client
22
API for application developers
33

4+
## Regenerating the Client
5+
6+
This client is automatically generated from the OpenAPI specification. To regenerate the client:
7+
8+
### Using Docker (Recommended)
9+
10+
```bash
11+
# Pull the OpenAPI Generator Docker image (version 7.12.0 to match current)
12+
docker pull openapitools/openapi-generator-cli:v7.12.0
13+
14+
# Run the generator (from the repository root)
15+
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.12.0 generate \
16+
-i /local/gen/openapi.yaml \
17+
-g python \
18+
-c /local/gen/config.json \
19+
-o /local
20+
```
21+
22+
### Alternative: Using NPM
23+
24+
```bash
25+
# Install via npm
26+
npm install -g @openapitools/openapi-generator-cli@7.12.0
27+
28+
# Set the version
29+
npx @openapitools/openapi-generator-cli version-manager set 7.12.0
30+
31+
# Generate the client
32+
npx @openapitools/openapi-generator-cli generate \
33+
-i ./gen/openapi.yaml \
34+
-g python \
35+
-c ./gen/config.json \
36+
-o .
37+
```
38+
39+
### After Generation
40+
41+
```bash
42+
# Build the package
43+
uv build
44+
45+
# Optionally publish the package
46+
uv publish
47+
```
48+
49+
### Important Notes
50+
51+
- The OpenAPI spec at `./gen/openapi.yaml` is the source of truth for this client
52+
- Update this spec file first if you need to update the API client
53+
- The configuration in `./gen/config.json` specifies the package name as "codegen_api_client"
54+
- GitHub workflows handle testing and publishing, but not regeneration
55+
56+
---
57+
458
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
559

660
- API version: 1.0.0
@@ -114,6 +168,3 @@ Endpoints do not require authorization.
114168

115169
## Author
116170

117-
118-
119-

0 commit comments

Comments
 (0)