mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
doc[api spec]:rename folder name to
Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
828c7c082d
commit
07dbbf1023
2
Makefile
2
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
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user