Skip to content

Commit 70a7b2b

Browse files
authored
Merge pull request #371 from brendandburns/docs
Improve code generation documentation.
2 parents 1433a40 + e1b3be0 commit 70a7b2b

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,37 @@ Participation in the Kubernetes community is governed by the [CNCF Code of Condu
156156

157157
# Development
158158

159-
## Update the client
159+
## Update the generated code.
160160

161-
To update the client clone the `gen` repo and run this command at the root of the client repo:
161+
The code is generated by the [swagger-codegen project](https://github.com/swagger-api/swagger-codegen).
162162

163-
```bash
164-
${GEN_REPO_BASE}/openapi/java.sh kubernetes settings
163+
We have built general purpose cross-language tools for generating code, it is hosted in the
164+
[kubernetes-client/gen](https://github.com/kubernetes-client/gen) repository.
165+
166+
To get started, in a root directory that is _not_ your `java` client directory, for example your
167+
directory layout could be:
168+
```
169+
${HOME}/
170+
src/
171+
gen/
172+
java/
173+
...
174+
```
175+
176+
Then to clone the `gen` repository, you would run:
177+
178+
```sh
179+
cd ${HOME}/src
180+
git clone https://github.com/kubernetes-client/gen
181+
export GEN_ROOT=${PWD}
165182
```
183+
184+
Then to update the client:
185+
186+
```sh
187+
cd ${HOME}/src/java
188+
${GEN_ROOT}/gen/openapi/java.sh kubernetes ./settings
189+
```
190+
191+
This should run through a long-ish build process involving `docker` and eventually result in a new set of
192+
generated code in the `kubernetes` directory.

0 commit comments

Comments
 (0)