31 lines
706 B
YAML
31 lines
706 B
YAML
#!api-testing
|
|
# yaml-language-server: $schema=/workspace/api-testing/docs/api-testing-schema.json
|
|
name: Gitee
|
|
api: https://gitee.com/api/v5
|
|
param:
|
|
repo: api-testing
|
|
items:
|
|
- name: stargazers
|
|
before:
|
|
items:
|
|
- sleep(1)
|
|
request:
|
|
api: /repos/linuxsuren/{{.param.repo}}/stargazers
|
|
expect:
|
|
verify:
|
|
- len(["data"]) > 0
|
|
- name: branches
|
|
request:
|
|
api: /repos/linuxsuren/{{.param.repo}}/branches
|
|
expect:
|
|
verify:
|
|
- len(filter(data, .name == "master")) == 1
|
|
- name: branch
|
|
request:
|
|
api: /repos/linuxsuren/{{.param.repo}}/branches/{{(index .branches 0).name}}
|
|
expect:
|
|
verify:
|
|
- len(data.name) > 0
|
|
spec:
|
|
kind: swagger
|
|
url: https://gitee.com/api/v5/doc_json |