-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
12,236 additions
and
1,510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 1.25.8.1 | ||
- Bumped API stubs from 1.22 to 1.25 | ||
- Added stubs generation tooling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"allowUnicodeIdentifiers": true, | ||
"projectName": "kubernetes", | ||
"projectDescription": "Clojure kubernetes client API stub" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
export CODEGEN_VERSION=2.2.1 | ||
export K8S_OPENAPI_ENDPOINT="/openapi/v2" | ||
export OPENAPI_DIFINITION="/tmp/openapi.json" | ||
export GENERATED_DIRECTORY="/tmp/openapi-generated" | ||
export TO_PATCH="${GENERATED_DIRECTORY}/src" | ||
|
||
########################################## | ||
# Prepare Tools | ||
########################################## | ||
|
||
cd "$(dirname "$0")" | ||
rm -rf ${GENERATED_DIRECTORY} | ||
|
||
if ! [ -f swagger-codegen-cli.jar ]; then | ||
wget -q https://oss.sonatype.org/content/repositories/releases/io/swagger/swagger-codegen-cli/${CODEGEN_VERSION}/swagger-codegen-cli-${CODEGEN_VERSION}.jar -O swagger-codegen-cli.jar | ||
fi | ||
|
||
########################################## | ||
# Export OpenAPI definition | ||
########################################## | ||
|
||
kubectl get --raw="${K8S_OPENAPI_ENDPOINT}" | jq > ${OPENAPI_DIFINITION} | ||
|
||
java -jar swagger-codegen-cli.jar \ | ||
generate \ | ||
-i ${OPENAPI_DIFINITION} \ | ||
-l clojure \ | ||
-o ${GENERATED_DIRECTORY} \ | ||
-c clojure-config.json $@ | ||
|
||
########################################## | ||
# Merge directories | ||
########################################## | ||
|
||
cd .. | ||
rsync -avP ${TO_PATCH}/ src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.