diff --git a/Makefile b/Makefile index 2e083e9fd..2c1bfdc44 100644 --- a/Makefile +++ b/Makefile @@ -455,7 +455,7 @@ swagger_client: wget -q http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar -O swagger-codegen-cli.jar rm -rf harborclient mkdir harborclient - java -jar swagger-codegen-cli.jar generate -i API/harbor/swagger.yaml -l python -o harborclient + java -jar swagger-codegen-cli.jar generate -i api/harbor/swagger.yaml -l python -o harborclient cd harborclient; python ./setup.py install pip install docker -q pip freeze diff --git a/API/harbor/swagger.yaml b/api/harbor/swagger.yaml similarity index 100% rename from API/harbor/swagger.yaml rename to api/harbor/swagger.yaml diff --git a/docs/configure_swagger.md b/docs/configure_swagger.md index fd4c08d4d..c062ad24f 100644 --- a/docs/configure_swagger.md +++ b/docs/configure_swagger.md @@ -14,7 +14,7 @@ From time to time, you may need to mannually test Harbor REST API. You can deplo * Download _prepare-swagger.sh_ and _swagger.yaml_ under the _docs_ directory to your local Harbor directory, e.g. **~/harbor**. ```sh - wget https://raw.githubusercontent.com/goharbor/harbor/master/docs/prepare-swagger.sh https://raw.githubusercontent.com/goharbor/harbor/master/API/harbor/swagger.yaml + wget https://raw.githubusercontent.com/goharbor/harbor/master/docs/prepare-swagger.sh https://raw.githubusercontent.com/goharbor/harbor/master/api/harbor/swagger.yaml ``` * Edit the script file _prepare-swagger.sh_. ```sh diff --git a/make/photon/portal/Dockerfile b/make/photon/portal/Dockerfile index 5c343da25..137836a57 100644 --- a/make/photon/portal/Dockerfile +++ b/make/photon/portal/Dockerfile @@ -8,7 +8,7 @@ ENV NPM_CONFIG_REGISTRY=${npm_registry} COPY src/portal/package.json /build_dir COPY src/portal/package-lock.json /build_dir -COPY ./API/harbor/swagger.yaml /build_dir +COPY ./api/harbor/swagger.yaml /build_dir RUN apt-get update \ && apt-get install -y --no-install-recommends python-yaml=3.12-1 \ diff --git a/tests/swaggerchecker.sh b/tests/swaggerchecker.sh index 4c5e3b864..ecb70ef95 100755 --- a/tests/swaggerchecker.sh +++ b/tests/swaggerchecker.sh @@ -4,9 +4,9 @@ set +e SWAGGER_ONLINE_VALIDATOR="http://online.swagger.io/validator" if [ $TRAVIS_EVENT_TYPE = "push" ]; then - HARBOR_SWAGGER_FILE="https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_COMMIT/API/harbor/swagger.yaml" + HARBOR_SWAGGER_FILE="https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_COMMIT/api/harbor/swagger.yaml" elif [ $TRAVIS_EVENT_TYPE = "pull_request" ]; then - HARBOR_SWAGGER_FILE="https://raw.githubusercontent.com/$TRAVIS_PULL_REQUEST_SLUG/$TRAVIS_PULL_REQUEST_SHA/API/harbor/swagger.yaml" + HARBOR_SWAGGER_FILE="https://raw.githubusercontent.com/$TRAVIS_PULL_REQUEST_SLUG/$TRAVIS_PULL_REQUEST_SHA/api/harbor/swagger.yaml" else echo "* don't support this kinds of action ($TRAVIS_EVENT_TYPE), but don't fail the travis CI." exit 0