mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 20:21:20 +00:00
hack and hooks scripts for generating swagger docs
This commit is contained in:
@@ -93,8 +93,8 @@ files_need_description=()
|
||||
# Check API schema definitions for field descriptions
|
||||
for file in $(git diff --cached --name-only --diff-filter ACM | egrep "pkg/api/v.[^/]*/types\.go" | grep -v "third_party"); do
|
||||
# Check for files with fields without description tags
|
||||
descriptionless=$(hack/after-build/verify-description.sh "${file}")
|
||||
if [[ "$descriptionless" != "" ]]; then
|
||||
descriptionless=$(hack/after-build/verify-description.sh "${file}" > /dev/null; echo $?)
|
||||
if [[ "$descriptionless" -ne "0" ]]; then
|
||||
files_need_description+=("${file}")
|
||||
fi
|
||||
done
|
||||
@@ -158,6 +158,18 @@ else
|
||||
fi
|
||||
echo "${reset}"
|
||||
|
||||
echo -ne "Checking for swagger type documentation that need updating... "
|
||||
if ! hack/after-build/verify-generated-swagger-docs.sh > /dev/null; then
|
||||
echo "${red}ERROR!"
|
||||
echo "Swagger type documentation needs to be updated."
|
||||
echo "To regenerate the spec, run:"
|
||||
echo " hack/update-generated-swagger-docs.sh"
|
||||
exit_code=1
|
||||
else
|
||||
echo "${green}OK"
|
||||
fi
|
||||
echo "${reset}"
|
||||
|
||||
echo -ne "Checking for swagger spec that need updating... "
|
||||
if ! hack/after-build/verify-swagger-spec.sh > /dev/null; then
|
||||
echo "${red}ERROR!"
|
||||
|
Reference in New Issue
Block a user