diff --git a/.github/markdown_lint_config.json b/.github/markdown_lint_config.json new file mode 100644 index 00000000..6a18cccb --- /dev/null +++ b/.github/markdown_lint_config.json @@ -0,0 +1,54 @@ +{ + "MD001": true, + "MD002": false, + "MD003": false, + "MD004": false, + "MD005": false, + "MD006": false, + "MD007": false, + "MD008": false, + "MD009": false, + "MD010": false, + "MD011": false, + "MD012": false, + "MD013": false, + "MD014": false, + "MD015": false, + "MD016": false, + "MD017": false, + "MD018": false, + "MD019": false, + "MD020": false, + "MD021": false, + "MD022": false, + "MD023": false, + "MD024": false, + "MD025": false, + "MD026": false, + "MD027": false, + "MD028": false, + "MD029": false, + "MD030": false, + "MD031": true, + "MD032": false, + "MD033": false, + "MD034": false, + "MD035": false, + "MD036": false, + "MD037": true, + "MD038": true, + "MD039": false, + "MD040": false, + "MD041": false, + "MD042": false, + "MD043": false, + "MD044": false, + "MD045": false, + "MD046": false, + "MD047": false, + "MD048": false, + "MD049": false, + "MD050": false, + "MD051": false + } + \ No newline at end of file diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000..a608d8e6 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,99 @@ +name: Hugo Docs +on: + push: + branches: + - "master" + paths: + - 'docs/site/**' + - 'tools/make/docs.mk' + pull_request: + branches: + - "main" + paths: + - 'docs/site/**' + - 'tools/make/docs.mk' + +permissions: + contents: read + +jobs: + docs-lint: + runs-on: ubuntu-22.04 + steps: + - name: Check out code + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - uses: ./tools/github-actions/setup-deps + + - name: Run markdown linter + uses: nosborn/github-action-markdown-cli@9b5e871c11cc0649c5ac2526af22e23525fa344d # v3.3.0 + with: + files: docs/site/content/* + config_file: ".github/markdown_lint_config.json" + + - name: Install linkinator + run: npm install -g linkinator@6.0.4 + + - name: Check links + run: make docs docs-check-links + + docs-build: + runs-on: ubuntu-latest + needs: docs-lint + permissions: + contents: write + steps: + - name: Git checkout + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + with: + submodules: true + ref: ${{ github.event.pull_request.head.sha }} + + - uses: ./tools/github-actions/setup-deps + + - name: Setup Hugo + uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0 + with: + hugo-version: 'latest' + extended: true + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.1.0 + with: + node-version: '18' + + - name: Install Site Dependencies and Build Site + run: make docs docs-check-links + + # Upload docs for GitHub Pages + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + # Path of the directory containing the static assets. + path: docs/site/public + # Duration after which artifact will expire in days. + # retention-days: # optional, default is 1 + + # This workflow contains a single job called "build" + docs-publish: + if: github.event_name == 'push' + runs-on: ubuntu-latest + needs: docs-build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + deployments: write + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 diff --git a/.github/workflows/md-link-check.yml b/.github/workflows/md-link-check.yml deleted file mode 100644 index ee2b924a..00000000 --- a/.github/workflows/md-link-check.yml +++ /dev/null @@ -1,44 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Check broken links - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [master] - pull_request: - branches: [master] - schedule: - # Run everyday at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) - - cron: "0 5 * * *" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - check: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "18" - - - name: markdown-link-check - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - use-quiet-mode: "yes" - config-file: "checklink_config.json" - max-depth: 3 - - - name: Archive Broken Links List - uses: actions/upload-artifact@v3 - if: always() - with: - name: broken-links.json - path: /brokenLinks.json - retention-days: 5 \ No newline at end of file diff --git a/.dockerignore b/docs/site/.dockerignore similarity index 100% rename from .dockerignore rename to docs/site/.dockerignore diff --git a/docs/site/.gitignore b/docs/site/.gitignore new file mode 100644 index 00000000..40b67f41 --- /dev/null +++ b/docs/site/.gitignore @@ -0,0 +1,5 @@ +/public +resources/ +node_modules/ +package-lock.json +.hugo_build.lock \ No newline at end of file diff --git a/docs/site/.nvmrc b/docs/site/.nvmrc new file mode 100644 index 00000000..b009dfb9 --- /dev/null +++ b/docs/site/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/docs/site/Dockerfile b/docs/site/Dockerfile new file mode 100644 index 00000000..c9763418 --- /dev/null +++ b/docs/site/Dockerfile @@ -0,0 +1,4 @@ +FROM klakegg/hugo:ext-alpine@sha256:536dd4805d0493ee13bf1f3df3852ed1f26d1625983507c8c56242fc029b44c7 + +RUN apk add git && \ + git config --global --add safe.directory /src diff --git a/docs/site/assets/icons/logo.png b/docs/site/assets/icons/logo.png new file mode 100644 index 00000000..c91a159e Binary files /dev/null and b/docs/site/assets/icons/logo.png differ diff --git a/docs/site/assets/icons/logo.svg b/docs/site/assets/icons/logo.svg new file mode 100644 index 00000000..2e7b0c33 --- /dev/null +++ b/docs/site/assets/icons/logo.svg @@ -0,0 +1,210 @@ + + + diff --git a/docs/site/assets/scss/_variables_project.scss b/docs/site/assets/scss/_variables_project.scss new file mode 100644 index 00000000..a3b6991f --- /dev/null +++ b/docs/site/assets/scss/_variables_project.scss @@ -0,0 +1,9 @@ +/* + +Add styles or override variables from the theme here. + +*/ + +$primary: #1e71ec; +$secondary: #ffffff; +$dark: #4a9ff5; diff --git a/docs/site/config.yaml b/docs/site/config.yaml new file mode 100644 index 00000000..9070e384 --- /dev/null +++ b/docs/site/config.yaml @@ -0,0 +1,15 @@ +# THIS IS A TEST CONFIG ONLY! +# FOR THE CONFIGURATION OF YOUR SITE USE hugo.yaml. +# +# As of Docsy 0.7.0, Hugo 0.110.0 or later must be used. +# +# The sole purpose of this config file is to detect Hugo-module builds that use +# an older version of Hugo. +# +# DO NOT add any config parameters to this file. You can safely delete this file +# if your project is using the required Hugo version. + +module: + hugoVersion: + extended: true + min: 0.110.0 diff --git a/docs/site/content/en/_index.md b/docs/site/content/en/_index.md new file mode 100644 index 00000000..74b4fe7d --- /dev/null +++ b/docs/site/content/en/_index.md @@ -0,0 +1,16 @@ +--- +title: API Testing +--- + +{{< blocks/cover title="Welcome to API Testing!" image_anchor="top" height="full" >}} + + GET STARTED + + + CONTRIBUTING + +
YAML based API testing tool. interface debug and test tools.
+ +{{< blocks/link-down color="white" >}} +todo add relative content
+{{< /blocks/cover >}} diff --git a/docs/site/content/en/about/index.md b/docs/site/content/en/about/index.md new file mode 100644 index 00000000..8bf999a0 --- /dev/null +++ b/docs/site/content/en/about/index.md @@ -0,0 +1,21 @@ +--- +title: About API Testing +linkTitle: About +--- + +{{% blocks/cover title="About API Testing" height="auto" %}} + +API Testing is an open source project for interface debug and test tools. + +Read on to find out more, or visit our [documentation](/latest/) to get started! +{{% /blocks/cover %}} + +{{% blocks/section color="black" %}} + +## Objectives + +--- + +// TBD. + +{{% /blocks/section %}} diff --git a/docs/site/content/en/contributions/CODE_OF_CONDUCT.md b/docs/site/content/en/contributions/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..920e60b3 --- /dev/null +++ b/docs/site/content/en/contributions/CODE_OF_CONDUCT.md @@ -0,0 +1,35 @@ +--- +title: "Contributor Code of Conduct" +weight: -1 +description: "This section records Contributor Code of Conduct of API Testing." +--- + +## Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery + +- Personal attacks + +- Trolling or insulting/derogatory comments + +- Public or private harassment + +- Publishing other’s private information, such as physical or electronic addresses, without explicit permission + +- Other unethical or unprofessional conduct + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org/), version 1.3.0, available at [contributor-covenant.org/version/1/3/0/](http://contributor-covenant.org/version/1/3/0/) diff --git a/docs/site/content/en/contributions/CONTRIBUTING.md b/docs/site/content/en/contributions/CONTRIBUTING.md new file mode 100644 index 00000000..a5a4c950 --- /dev/null +++ b/docs/site/content/en/contributions/CONTRIBUTING.md @@ -0,0 +1,101 @@ +--- +title: "Contributing" +weight: -1 +description: "This section contributing of API Testing." +--- + +> English | [中文](CONTRIBUTING-ZH.md) + +Please join us to improve this project. + +The backend is written by [Golang](https://go.dev/), and the front-end is written by [Vue](https://vuejs.org/). + +## For beginner + +You might need to know the following tech before get started. + +| Name | Domain | +|-----------------------------------------------------------------------------|------------------------------------------------------------------------| +| [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview) Protocol | Core | +| [RESTful](https://en.wikipedia.org/wiki/REST) | Core | +| [gRPC](https://grpc.io/) | `gRPC` runner extension | +| [Prometheus](https://prometheus.io/) | Application monitor | +| [Cobra](https://github.com/spf13/cobra) | The Go CLI framework | +| [Element Plus](https://element-plus.org/) | The front-end framework | +| [Docker](https://www.docker.com/get-started/) | The container image build | +| [Helm chart](https://helm.sh/) | The [Kubernetes](https://kubernetes.io/docs/home/) application package | +| [GitHub Actions](https://docs.github.com/en/actions) | The continuous integration | +| [make](https://www.gnu.org/software/make/) | The automated Build Tools | +| [Docs Guide](https://github.com/LinuxSuRen/api-testing.git) | Documentation Guidelines | + +## Setup development environment + +> This project uses `make` as a build tool and has a very powerful make command system. +> You can see all the available commands by running `make help`. + +It's highly recommended you to configure the git pre-commit hook. It will force to run unit tests before commit. +Run the following command: + +```shell +make install-precheck +``` + +## Print the code of lines: + +```shell +git ls-files | xargs cloc +``` + +## pprof + +``` +go tool pprof -http=:9999 http://localhost:8080/debug/pprof/heap +``` + +Other usage of this: +* `/debug/pprof/heap?gc=1` +* `/debug/pprof/heap?seconds=10` +* `/debug/pprof/goroutine/?debug=0` + +## SkyWalking + +```shell +docker run -p 12800:12800 -p 9412:9412 docker.io/apache/skywalking-oap-server:9.0.0 +docker run -p 8080:8080 -e SW_OAP_ADDRESS=http://172.11.0.6:12800 -e SW_ZIPKIN_ADDRESS=http://172.11.0.6:9412 docker.io/apache/skywalking-ui:9.0.0 + +make build + +export SW_AGENT_NAME=atest +export SW_AGENT_REPORTER_GRPC_BACKEND_SERVICE=172.11.0.6:30689 +export SW_AGENT_PLUGIN_CONFIG_HTTP_SERVER_COLLECT_PARAMETERS=true +export SW_AGENT_METER_COLLECT_INTERVAL=3 +export SW_AGENT_LOG_TYPE=std +export SW_AGENT_REPORTER_DISCARD=true +./bin/atest server --local-storage 'bin/*.yaml' --http-port 8082 --port 7072 --console-path console/atest-ui/dist/ +``` + +Run SkyWalking with BanYanDB: + +```shell +docker run -p 17912:17912 -p 17913:17913 apache/skywalking-banyandb:latest standalone + +docker run -p 12800:12800 -p 9412:9412 \ + -e SW_STORAGE=banyandb \ + -e SW_STORAGE_BANYANDB_HOST=192.168.1.98 \ + docker.io/apache/skywalking-oap-server +``` + +## First contribution + +For developers contributing code to this project for the first time, you should run the following command in your local development environment: + +```shell +make test +``` + +This will help you to check for and fix any bugs that you encounter at commit time, as well as reduce the complexity of the review. + +## FAQ + +* Got sum missing match error of go. + * Run command: `go clean -modcache && go mod tidy` diff --git a/docs/site/content/en/contributions/SECURITY.md b/docs/site/content/en/contributions/SECURITY.md new file mode 100644 index 00000000..8d28ddb3 --- /dev/null +++ b/docs/site/content/en/contributions/SECURITY.md @@ -0,0 +1,24 @@ +--- +title: "Security" +weight: -1 +description: "This section security of API Testing." +--- + +## Reporting Security Issues + +The API Testing commnity takes a rigorous standpoint in annihilating the security issues in its software projects. API Testing is highly sensitive and forthcoming to issues pertaining to its features and functionality. + +## REPORTING VULNERABILITY + +If you have apprehensions regarding API Testing's security or you discover vulnerability or potential threat, don’t hesitate to get in touch with the api-testing Security Team by dropping a mail at [api-testing-security@googlegroups.com](mailto:api-testing-security@googlegroups.com). In the mail, specify the description of the issue or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The API Testing community will get back to you after assessing and analysing the findings. + +PLEASE PAY ATTENTION to report the security issue on the security email before disclosing it on public domain. + +## VULNERABILITY HANDLING + +An overview of the vulnerability handling process is: + +The reporter reports the vulnerability privately to API Testing community. +The appropriate project's security team works privately with the reporter to resolve the vulnerability. +A new release of the API Testing product concerned is made that includes the fix. +The vulnerability is publically announced. diff --git a/docs/site/content/en/contributions/_index.md b/docs/site/content/en/contributions/_index.md new file mode 100644 index 00000000..fc9a0518 --- /dev/null +++ b/docs/site/content/en/contributions/_index.md @@ -0,0 +1,8 @@ ++++ +title = "Get Involved" +description = "This section includes contents related to Contributions" +linktitle = "Get Involved" + +[[cascade]] +type = "docs" ++++ \ No newline at end of file diff --git a/docs/site/content/en/contributions/design/Todo.md b/docs/site/content/en/contributions/design/Todo.md new file mode 100644 index 00000000..2def7718 --- /dev/null +++ b/docs/site/content/en/contributions/design/Todo.md @@ -0,0 +1,7 @@ +--- +title: "Todo Add Design" +weight: -100 +description: Todo. +--- + +// TBD diff --git a/docs/site/content/en/contributions/design/_index.md b/docs/site/content/en/contributions/design/_index.md new file mode 100644 index 00000000..aa57d52e --- /dev/null +++ b/docs/site/content/en/contributions/design/_index.md @@ -0,0 +1,5 @@ +--- +title: "Design" +weight: -100 +description: This section includes Designs of API Testing. +--- diff --git a/docs/site/content/en/contributions/roadmap.md b/docs/site/content/en/contributions/roadmap.md new file mode 100644 index 00000000..788ba28c --- /dev/null +++ b/docs/site/content/en/contributions/roadmap.md @@ -0,0 +1,7 @@ +--- +title: "Roadmap" +weight: -1 +description: "This section records the roadmap of API Testing." +--- + +// TBD diff --git a/docs/site/content/en/latest/_index.md b/docs/site/content/en/latest/_index.md new file mode 100644 index 00000000..c3370128 --- /dev/null +++ b/docs/site/content/en/latest/_index.md @@ -0,0 +1,18 @@ ++++ +title = "Welcome to API Testing" +linktitle = "Documentation" +description = "API Testing Documents" + +[[cascade]] +type = "docs" ++++ + +{{% alert title="Note" color="primary" %}} + +This project is under **active** development. Many features are not complete. We would love for you to [Get Involved](/contributions)! + +{{% /alert %}} + +// TBD. + +## Ready to get started? diff --git a/docs/site/content/en/latest/api/_index.md b/docs/site/content/en/latest/api/_index.md new file mode 100644 index 00000000..deb2bf12 --- /dev/null +++ b/docs/site/content/en/latest/api/_index.md @@ -0,0 +1,5 @@ +--- +title: "API" +description: This section includes APIs of API Testing. +weight: 80 +--- diff --git a/docs/site/content/en/latest/api/extension_types.md b/docs/site/content/en/latest/api/extension_types.md new file mode 100644 index 00000000..430f78db --- /dev/null +++ b/docs/site/content/en/latest/api/extension_types.md @@ -0,0 +1,5 @@ ++++ +title = "API Reference" ++++ + +// TBD. diff --git a/docs/site/content/en/latest/install/_index.md b/docs/site/content/en/latest/install/_index.md new file mode 100644 index 00000000..133f1ffa --- /dev/null +++ b/docs/site/content/en/latest/install/_index.md @@ -0,0 +1,5 @@ +--- +title: "Installation" +description: This section includes installation related contents of API Testing. +weight: 70 +--- diff --git a/docs/site/content/en/latest/install/install-locally.md b/docs/site/content/en/latest/install/install-locally.md new file mode 100644 index 00000000..6c2f7555 --- /dev/null +++ b/docs/site/content/en/latest/install/install-locally.md @@ -0,0 +1,8 @@ ++++ +title = "Install with Locally" +weight = -99 ++++ + +// TBD + +Install API Testing. diff --git a/docs/site/content/en/latest/releases/_index.md b/docs/site/content/en/latest/releases/_index.md new file mode 100644 index 00000000..cc0b2195 --- /dev/null +++ b/docs/site/content/en/latest/releases/_index.md @@ -0,0 +1,5 @@ +--- +title: "Releases" +weight: 90 +description: This section includes Releases of API Testing. +--- diff --git a/docs/site/content/en/latest/releases/v0.1.0.md b/docs/site/content/en/latest/releases/v0.1.0.md new file mode 100644 index 00000000..b69c2381 --- /dev/null +++ b/docs/site/content/en/latest/releases/v0.1.0.md @@ -0,0 +1,8 @@ +--- +title: "v0.1.0" +publishdate: 2022-05-16 +--- + +Date: 2024 06 01 + +// TBD diff --git a/docs/site/content/en/latest/tasks/_index.md b/docs/site/content/en/latest/tasks/_index.md new file mode 100644 index 00000000..dd1d6494 --- /dev/null +++ b/docs/site/content/en/latest/tasks/_index.md @@ -0,0 +1,5 @@ +--- +title: "Tasks" +weight: 2 +description: Learn API Testing hands-on through tasks +--- diff --git a/docs/grpc-manual.md b/docs/site/content/en/latest/tasks/grpc-manual.md similarity index 98% rename from docs/grpc-manual.md rename to docs/site/content/en/latest/tasks/grpc-manual.md index a8df135d..cdaa94ff 100644 --- a/docs/grpc-manual.md +++ b/docs/site/content/en/latest/tasks/grpc-manual.md @@ -1,4 +1,7 @@ -# gRPC testsuite writing manual ++++ +title = "gRPC testsuite writing manual" +weight = -99 ++++ This document will introduce how to write testsuite for the gRPC API of `api-testing`. diff --git a/docs/mock-server.md b/docs/site/content/en/latest/tasks/mock-server.md similarity index 83% rename from docs/mock-server.md rename to docs/site/content/en/latest/tasks/mock-server.md index 175e12a3..f89c2bf5 100644 --- a/docs/mock-server.md +++ b/docs/site/content/en/latest/tasks/mock-server.md @@ -1,3 +1,8 @@ ++++ +title = "Mock server get started" +weight = -99 ++++ + ## Get started You can start a mock server of [container registry](https://distribution.github.io/distribution/) with below command: diff --git a/docs/prometheus.md b/docs/site/content/en/latest/tasks/prometheus.md similarity index 93% rename from docs/prometheus.md rename to docs/site/content/en/latest/tasks/prometheus.md index 24816c4c..ed8048d3 100644 --- a/docs/prometheus.md +++ b/docs/site/content/en/latest/tasks/prometheus.md @@ -1,4 +1,6 @@ -## Pushing the test results into Prometheus ++++ +title = "Pushing the test results into Prometheus" ++++ You can use the following command to do it: diff --git a/docs/site/content/en/latest/tasks/quickstart.md b/docs/site/content/en/latest/tasks/quickstart.md new file mode 100644 index 00000000..b6a751ed --- /dev/null +++ b/docs/site/content/en/latest/tasks/quickstart.md @@ -0,0 +1,7 @@ +--- +title: "Quickstart" +weight: 1 +description: Get started with API Testing in a few simple steps. +--- + +// TBD diff --git a/docs/secure.md b/docs/site/content/en/latest/tasks/secure.md similarity index 98% rename from docs/secure.md rename to docs/site/content/en/latest/tasks/secure.md index 55a7239a..ce190566 100644 --- a/docs/secure.md +++ b/docs/site/content/en/latest/tasks/secure.md @@ -1,4 +1,6 @@ -# Secure ++++ +title = "Secure" ++++ Usually, when TLS certificate authentication is not used, the gRPC client and server communicate in plain text, and the information is easily eavesdropped or tampered by a third party. Therefore, it is recommended to use SSL/TLS to protect gRPC services in most cases. Currently, `atest` has implemented server-side TLS, and mutual TLS (mTLS) needs to wait for implementation. diff --git a/docs/site/content/en/news/_index.md b/docs/site/content/en/news/_index.md new file mode 100644 index 00000000..e6e8d8a0 --- /dev/null +++ b/docs/site/content/en/news/_index.md @@ -0,0 +1,12 @@ ++++ +title = "News" +linktitle = "News" +description = "API Testing News" + +[[cascade]] +type = "docs" ++++ + +This is the **News** section. It is organized into three categories: blogs, presentations and releases. + +The files in these directories will be listed in reverse chronological order. diff --git a/docs/site/content/en/news/blogs/_index.md b/docs/site/content/en/news/blogs/_index.md new file mode 100644 index 00000000..809de590 --- /dev/null +++ b/docs/site/content/en/news/blogs/_index.md @@ -0,0 +1,8 @@ ++++ +title = "Blogs" +description = "API Testing Blogs" +linktitle = "Blogs" + +[[cascade]] +type = "docs" ++++ diff --git a/docs/site/content/en/news/presentations/_index.md b/docs/site/content/en/news/presentations/_index.md new file mode 100644 index 00000000..584400c3 --- /dev/null +++ b/docs/site/content/en/news/presentations/_index.md @@ -0,0 +1,8 @@ ++++ +title = "Presentations" +description = "API Testing Presentations and activities." +linktitle = "Presentations" + +[[cascade]] +type = "docs" ++++ diff --git a/docs/site/content/en/news/releases/_index.md b/docs/site/content/en/news/releases/_index.md new file mode 100644 index 00000000..a3398db1 --- /dev/null +++ b/docs/site/content/en/news/releases/_index.md @@ -0,0 +1,23 @@ ++++ +title = "Posting Notice" +description = "API Testing posting notice" +linktitle = "Posting" + +[[cascade]] +type = "docs" ++++ + +This document provides details on API Testing releases. +API Testing follows the Semantic Version Control [v2.0.0 specification][] for release version control. +Since API Testing is a new project, minor versions are the only versions defined. +Additional release details, such as patch versions, will be created by API Testing maintainers at a future date. + +## Stable releases {#stable-releases} + + + +## Release management {#release-management}} + + + +## Release schedule} {#release-schedule} diff --git a/docs/site/content/en/search.md b/docs/site/content/en/search.md new file mode 100644 index 00000000..394feea5 --- /dev/null +++ b/docs/site/content/en/search.md @@ -0,0 +1,4 @@ +--- +title: Search Results +layout: search +--- diff --git a/docs/site/content/en/v0.0.1/_index.md b/docs/site/content/en/v0.0.1/_index.md new file mode 100644 index 00000000..c3370128 --- /dev/null +++ b/docs/site/content/en/v0.0.1/_index.md @@ -0,0 +1,18 @@ ++++ +title = "Welcome to API Testing" +linktitle = "Documentation" +description = "API Testing Documents" + +[[cascade]] +type = "docs" ++++ + +{{% alert title="Note" color="primary" %}} + +This project is under **active** development. Many features are not complete. We would love for you to [Get Involved](/contributions)! + +{{% /alert %}} + +// TBD. + +## Ready to get started? diff --git a/docs/site/content/en/v0.0.1/api/_index.md b/docs/site/content/en/v0.0.1/api/_index.md new file mode 100644 index 00000000..deb2bf12 --- /dev/null +++ b/docs/site/content/en/v0.0.1/api/_index.md @@ -0,0 +1,5 @@ +--- +title: "API" +description: This section includes APIs of API Testing. +weight: 80 +--- diff --git a/docs/site/content/en/v0.0.1/api/extension_types.md b/docs/site/content/en/v0.0.1/api/extension_types.md new file mode 100644 index 00000000..430f78db --- /dev/null +++ b/docs/site/content/en/v0.0.1/api/extension_types.md @@ -0,0 +1,5 @@ ++++ +title = "API Reference" ++++ + +// TBD. diff --git a/docs/site/content/en/v0.0.1/install/_index.md b/docs/site/content/en/v0.0.1/install/_index.md new file mode 100644 index 00000000..133f1ffa --- /dev/null +++ b/docs/site/content/en/v0.0.1/install/_index.md @@ -0,0 +1,5 @@ +--- +title: "Installation" +description: This section includes installation related contents of API Testing. +weight: 70 +--- diff --git a/docs/site/content/en/v0.0.1/install/install-locally.md b/docs/site/content/en/v0.0.1/install/install-locally.md new file mode 100644 index 00000000..6c2f7555 --- /dev/null +++ b/docs/site/content/en/v0.0.1/install/install-locally.md @@ -0,0 +1,8 @@ ++++ +title = "Install with Locally" +weight = -99 ++++ + +// TBD + +Install API Testing. diff --git a/docs/site/content/en/v0.0.1/releases/_index.md b/docs/site/content/en/v0.0.1/releases/_index.md new file mode 100644 index 00000000..cc0b2195 --- /dev/null +++ b/docs/site/content/en/v0.0.1/releases/_index.md @@ -0,0 +1,5 @@ +--- +title: "Releases" +weight: 90 +description: This section includes Releases of API Testing. +--- diff --git a/docs/site/content/en/v0.0.1/releases/v0.1.0.md b/docs/site/content/en/v0.0.1/releases/v0.1.0.md new file mode 100644 index 00000000..b69c2381 --- /dev/null +++ b/docs/site/content/en/v0.0.1/releases/v0.1.0.md @@ -0,0 +1,8 @@ +--- +title: "v0.1.0" +publishdate: 2022-05-16 +--- + +Date: 2024 06 01 + +// TBD diff --git a/docs/site/content/en/v0.0.1/tasks/_index.md b/docs/site/content/en/v0.0.1/tasks/_index.md new file mode 100644 index 00000000..dd1d6494 --- /dev/null +++ b/docs/site/content/en/v0.0.1/tasks/_index.md @@ -0,0 +1,5 @@ +--- +title: "Tasks" +weight: 2 +description: Learn API Testing hands-on through tasks +--- diff --git a/docs/site/content/en/v0.0.1/tasks/quickstart.md b/docs/site/content/en/v0.0.1/tasks/quickstart.md new file mode 100644 index 00000000..b6a751ed --- /dev/null +++ b/docs/site/content/en/v0.0.1/tasks/quickstart.md @@ -0,0 +1,7 @@ +--- +title: "Quickstart" +weight: 1 +description: Get started with API Testing in a few simple steps. +--- + +// TBD diff --git a/docs/site/content/zh/_index.md b/docs/site/content/zh/_index.md new file mode 100644 index 00000000..cf2e6481 --- /dev/null +++ b/docs/site/content/zh/_index.md @@ -0,0 +1,16 @@ +--- +title: API Testing +--- + +{{< blocks/cover title="欢迎访问 API Testing!" image_anchor="top" height="full" >}} + + 开始使用 + + + 参与贡献 + +开源接口调试 & 测试工具
+ +{{< blocks/link-down color="white" >}} +todo 补充一些关联内容
+{{< /blocks/cover >}} diff --git a/docs/site/content/zh/about/index.md b/docs/site/content/zh/about/index.md new file mode 100644 index 00000000..0a5aaab4 --- /dev/null +++ b/docs/site/content/zh/about/index.md @@ -0,0 +1,23 @@ +--- +title: 关于 API Testing. +linkTitle: 关于 +--- + +{{% blocks/cover title="About API Testing" height="auto" %}} + +API Testing 是一个接口调试和测试工具的开源项目。 + +请继续阅读以了解更多信息,或访问我们的 [文档](/latest/) 开始使用! + +{{% /blocks/cover %}} + +{{% blocks/section color="black" %}} + +## Objectives + +--- + +// TBD. + +{{% /blocks/section %}} + diff --git a/docs/site/content/zh/contributions/CONTRIBUTING-ZH.md b/docs/site/content/zh/contributions/CONTRIBUTING-ZH.md new file mode 100644 index 00000000..8c517b5a --- /dev/null +++ b/docs/site/content/zh/contributions/CONTRIBUTING-ZH.md @@ -0,0 +1,101 @@ +--- +title: "贡献指南" +weight: -1 +description: "API Testing 贡献指南." +--- + +> 中文 | [English](CONTRIBUTING.md) + +请加入我们,共同完善这个项目。 + +后端由 [Golang](https://go.dev/) 编写,前端由 [Vue](https://vuejs.org/) 编写。 + +### 对于初学者 + +在开始之前,您可能需要了解以下技术: + +| Name | Domain | +|-----------------------------------------------------------------------------|------------------------------------------------------------------------| +| [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview) Protocol | Core | +| [RESTful](https://en.wikipedia.org/wiki/REST) | Core | +| [gRPC](https://grpc.io/) | `gRPC` runner extension | +| [Prometheus](https://prometheus.io/) | Application monitor | +| [Cobra](https://github.com/spf13/cobra) | The Go CLI framework | +| [Element Plus](https://element-plus.org/) | The front-end framework | +| [Docker](https://www.docker.com/get-started/) | The container image build | +| [Helm chart](https://helm.sh/) | The [Kubernetes](https://kubernetes.io/docs/home/) application package | +| [GitHub Actions](https://docs.github.com/en/actions) | The continuous integration | +| [make](https://www.gnu.org/software/make/) | The automated Build Tools | +| [Docs Guide](https://github.com/LinuxSuRen/api-testing.git) | 文档编写指南 | + +## 设置开发环境 + +> 本项目使用 `make` 作为构建工具,并设计了非常强大的 make 指令系统。您可以通过运行 `make help` 查看所有可用的命令。 + +强烈建议您配置 `git pre-commit` 钩子。它会强制在提交前运行单元测试。 +运行以下命令: + +```shell +make install-precheck +``` + +## 打印各行代码: + +```shell +git ls-files | xargs cloc +``` + +## pprof + +```shell +go tool pprof -http=:9999 http://localhost:8080/debug/pprof/heap +``` + +其他用法: + +* `/debug/pprof/heap?gc=1` +* `/debug/pprof/heap?seconds=10` +* `/debug/pprof/goroutine/?debug=0` + +## SkyWalking + +```shell +docker run -p 12800:12800 -p 9412:9412 docker.io/apache/skywalking-oap-server:9.0.0 +docker run -p 8080:8080 -e SW_OAP_ADDRESS=http://172.11.0.6:12800 -e SW_ZIPKIN_ADDRESS=http://172.11.0.6:9412 docker.io/apache/skywalking-ui:9.0.0 + +make build + +export SW_AGENT_NAME=atest +export SW_AGENT_REPORTER_GRPC_BACKEND_SERVICE=172.11.0.6:30689 +export SW_AGENT_PLUGIN_CONFIG_HTTP_SERVER_COLLECT_PARAMETERS=true +export SW_AGENT_METER_COLLECT_INTERVAL=3 +export SW_AGENT_LOG_TYPE=std +export SW_AGENT_REPORTER_DISCARD=true +./bin/atest server --local-storage 'bin/*.yaml' --http-port 8082 --port 7072 --console-path console/atest-ui/dist/ +``` + +通过 BanYanDB 运行 SkyWalking: + +```shell +docker run -p 17912:17912 -p 17913:17913 apache/skywalking-banyandb:latest standalone + +docker run -p 12800:12800 -p 9412:9412 \ + -e SW_STORAGE=banyandb \ + -e SW_STORAGE_BANYANDB_HOST=192.168.1.98 \ + docker.io/apache/skywalking-oap-server +``` + +## 第一次贡献 + +对于第一次对此项目贡献代码的开发者,您应该在本地开发环境运行如下命令: + +```shell +make test +``` + +以确保通过项目测试,这会有助于您检查并解决在提交时遇到的错误,同时减少 review 的复杂度。 + +## FAQ + +* Got sum missing match error of go. + * 运行命令: `go clean -modcache && go mod tidy`. diff --git a/docs/site/content/zh/contributions/_index.md b/docs/site/content/zh/contributions/_index.md new file mode 100644 index 00000000..b9719c47 --- /dev/null +++ b/docs/site/content/zh/contributions/_index.md @@ -0,0 +1,8 @@ ++++ +title = "参与其中" +description = "本节包含与贡献相关的内容" +linktitle = "参与其中" + +[[cascade]] +type = "docs" ++++ \ No newline at end of file diff --git a/docs/site/content/zh/contributions/design/Goals.md b/docs/site/content/zh/contributions/design/Goals.md new file mode 100644 index 00000000..fe6f4101 --- /dev/null +++ b/docs/site/content/zh/contributions/design/Goals.md @@ -0,0 +1,7 @@ +--- +title: "目标" +weight: -1 +description: "API Testing goals." +--- + +// TBD diff --git a/docs/site/content/zh/contributions/design/_index.md b/docs/site/content/zh/contributions/design/_index.md new file mode 100644 index 00000000..cb066d42 --- /dev/null +++ b/docs/site/content/zh/contributions/design/_index.md @@ -0,0 +1,5 @@ +--- +title: "设计" +weight: -100 +description: 这部分包含 API Testing 的设计细节. +--- diff --git a/docs/site/content/zh/contributions/design/security-policy.md b/docs/site/content/zh/contributions/design/security-policy.md new file mode 100644 index 00000000..c2e89d10 --- /dev/null +++ b/docs/site/content/zh/contributions/design/security-policy.md @@ -0,0 +1,7 @@ +--- +title: "安全策略" +weight: -2 +description: "API Testing 安全策略。" +--- + +// TBD diff --git a/docs/site/content/zh/contributions/roadmap.md b/docs/site/content/zh/contributions/roadmap.md new file mode 100644 index 00000000..f7943986 --- /dev/null +++ b/docs/site/content/zh/contributions/roadmap.md @@ -0,0 +1,7 @@ +--- +title: "发展规划" +weight: -1 +description: "API Testing roadmap." +--- + +// TBD diff --git a/docs/introduce-zh.md b/docs/site/content/zh/latest/_index.md similarity index 93% rename from docs/introduce-zh.md rename to docs/site/content/zh/latest/_index.md index 3d914742..aea17930 100644 --- a/docs/introduce-zh.md +++ b/docs/site/content/zh/latest/_index.md @@ -1,3 +1,18 @@ ++++ +title = "欢迎访问 API Testing" +linktitle = "文档" +description = "API Testing 文档" + +[[cascade]] +type = "docs" ++++ + +{{% alert title="记录" color="primary" %}} + +该项目正在**积极**开发中,很多功能尚待补充,我们希望您[参与其中](contributions/)! + +{{% /alert %}} + API Testing 一个基于 YAML 文件的开源接口测试工具,同时支持运行在本地、服务端。 在选择工具时,可以从很多方面进行考量、对比,以下几点是该工具的特色或者优点: @@ -122,3 +137,5 @@ items: * 提供插件机制,增加对数据库等数据源的格式校验 最后期待您的反馈 https://github.com/LinuxSuRen/api-testing/issues + +## 准备好开始了吗? {#ready-to-get-started} diff --git a/docs/site/content/zh/latest/api/_index.md b/docs/site/content/zh/latest/api/_index.md new file mode 100644 index 00000000..793aac78 --- /dev/null +++ b/docs/site/content/zh/latest/api/_index.md @@ -0,0 +1,5 @@ +--- +title: "API" +description: 本节内容包含 API Testing 的 API。 +weight: 80 +--- diff --git a/docs/site/content/zh/latest/api/extension_types.md b/docs/site/content/zh/latest/api/extension_types.md new file mode 100644 index 00000000..2625c34a --- /dev/null +++ b/docs/site/content/zh/latest/api/extension_types.md @@ -0,0 +1,5 @@ ++++ +title = "API 引用" ++++ + +// TBD. diff --git a/docs/site/content/zh/latest/install/_index.md b/docs/site/content/zh/latest/install/_index.md new file mode 100644 index 00000000..259b5fcd --- /dev/null +++ b/docs/site/content/zh/latest/install/_index.md @@ -0,0 +1,5 @@ +--- +title: 安装 +description: 本节包含关于安装 API Testing 的内容。 +weight: 70 +--- diff --git a/docs/helm.md b/docs/site/content/zh/latest/install/install-helm.md similarity index 90% rename from docs/helm.md rename to docs/site/content/zh/latest/install/install-helm.md index a016fd74..33d2123c 100644 --- a/docs/helm.md +++ b/docs/site/content/zh/latest/install/install-helm.md @@ -1,3 +1,8 @@ ++++ +title = "通过 Helm 安装的方式使用 API Testing" +weight = -98 ++++ + You could install `api-testing` via Helm chart: ```shell diff --git a/docs/site/content/zh/latest/install/install-local.md b/docs/site/content/zh/latest/install/install-local.md new file mode 100644 index 00000000..b46ec974 --- /dev/null +++ b/docs/site/content/zh/latest/install/install-local.md @@ -0,0 +1,6 @@ ++++ +title = "通过本地安装的方式使用 API Testing" +weight = -99 ++++ + +// TBD diff --git a/docs/site/content/zh/latest/releases/_index.md b/docs/site/content/zh/latest/releases/_index.md new file mode 100644 index 00000000..ff01a441 --- /dev/null +++ b/docs/site/content/zh/latest/releases/_index.md @@ -0,0 +1,5 @@ +--- +title: "版本" +weight: 90 +description: 本节内容包含 API Testing 的版本概述。 +--- diff --git a/docs/release-note-v0.0.12.md b/docs/site/content/zh/latest/releases/release-note-v0.0.12.md similarity index 98% rename from docs/release-note-v0.0.12.md rename to docs/site/content/zh/latest/releases/release-note-v0.0.12.md index 4427c56e..631ee0cb 100644 --- a/docs/release-note-v0.0.12.md +++ b/docs/site/content/zh/latest/releases/release-note-v0.0.12.md @@ -1,3 +1,7 @@ ++++ +title = "v0.0.12" ++++ + `atest` 版本发布 v0.0.12 `atest` 是一款用 Golang 编写的、基于 YAML 格式的开源接口测试工具,可以方便地在本地、服务端、持续集成等场景中使用。 diff --git a/docs/release-note-v0.0.13.md b/docs/site/content/zh/latest/releases/release-note-v0.0.13.md similarity index 98% rename from docs/release-note-v0.0.13.md rename to docs/site/content/zh/latest/releases/release-note-v0.0.13.md index 5d718f42..5d0744e7 100644 --- a/docs/release-note-v0.0.13.md +++ b/docs/site/content/zh/latest/releases/release-note-v0.0.13.md @@ -1,3 +1,7 @@ ++++ +title = "v0.0.13" ++++ + `atest` 版本发布 `v0.0.13` `atest` 是一款用 Golang 编写的、开源的接口测试工具。 diff --git a/docs/release-note-v0.0.14.md b/docs/site/content/zh/latest/releases/release-note-v0.0.14.md similarity index 98% rename from docs/release-note-v0.0.14.md rename to docs/site/content/zh/latest/releases/release-note-v0.0.14.md index 5333eb76..e8d6f33b 100644 --- a/docs/release-note-v0.0.14.md +++ b/docs/site/content/zh/latest/releases/release-note-v0.0.14.md @@ -1,3 +1,7 @@ ++++ +title = "v0.0.14" ++++ + `atest` 版本发布 `v0.0.14` `atest` 是一款用 Golang 编写的、开源的接口测试工具。 diff --git a/docs/release-note-v0.0.15.md b/docs/site/content/zh/latest/releases/release-note-v0.0.15.md similarity index 98% rename from docs/release-note-v0.0.15.md rename to docs/site/content/zh/latest/releases/release-note-v0.0.15.md index 93ce19e5..64154c3c 100644 --- a/docs/release-note-v0.0.15.md +++ b/docs/site/content/zh/latest/releases/release-note-v0.0.15.md @@ -1,3 +1,7 @@ ++++ +title = "v0.0.15" ++++ + `atest` 发布 `v0.0.15` `atest` 是致力于帮助开发者持续保持高质量 API 的开源接口工具。 diff --git a/docs/site/content/zh/latest/releases/v0.0.1.md b/docs/site/content/zh/latest/releases/v0.0.1.md new file mode 100644 index 00000000..a76022ac --- /dev/null +++ b/docs/site/content/zh/latest/releases/v0.0.1.md @@ -0,0 +1,8 @@ +--- +title: "v0.0.1" +publishdate: 2024-04-09 +--- + +日期:2024 年 6 月 1 日 + +// TBD diff --git a/docs/site/content/zh/latest/tasks/_index.md b/docs/site/content/zh/latest/tasks/_index.md new file mode 100644 index 00000000..5212c83e --- /dev/null +++ b/docs/site/content/zh/latest/tasks/_index.md @@ -0,0 +1,5 @@ +--- +title: "任务" +weight: 2 +description: 通过任务学习 API Testing 实践。 +--- diff --git a/docs/grpc-manual-zh.md b/docs/site/content/zh/latest/tasks/grpc-manual-zh.md similarity index 98% rename from docs/grpc-manual-zh.md rename to docs/site/content/zh/latest/tasks/grpc-manual-zh.md index bf4128a0..a7ba04dd 100644 --- a/docs/grpc-manual-zh.md +++ b/docs/site/content/zh/latest/tasks/grpc-manual-zh.md @@ -1,10 +1,12 @@ -# gRPC测试用例编写指南 ++++ +title = "gRPC测试用例编写指南" ++++ 本文档将介绍如何编写`api-testing`的 gRPC API 的测试用例。 阅读本文档之前,您需要先安装并配置好`api-testing`,具体操作可以参考[官方文档](./README.md)。如果您已经完成了这些步骤,可以继续阅读本文档的后续部分。 -## 创建测试项目 +## 创建测试项目 创建一个基于服务反射的 gRPC 测试用例仅需在 yaml 文件的`spec`路径下加入以下内容: diff --git a/docs/site/content/zh/latest/tasks/mock-server.md b/docs/site/content/zh/latest/tasks/mock-server.md new file mode 100644 index 00000000..2e10ccbd --- /dev/null +++ b/docs/site/content/zh/latest/tasks/mock-server.md @@ -0,0 +1,17 @@ ++++ +title = "Mock Server 功能使用" ++++ + +## Get started + +您可以通过执行下面的命令 mock 一个容器仓库服务[container registry](https://distribution.github.io/distribution/): + +```shell +atest mock --prefix / mock/image-registry.yaml +``` + +之后,您可以通过使用如下的命令使用 mock 功能。 + +```shell +docker pull localhost:6060/repo/name:tag +``` diff --git a/docs/site/content/zh/latest/tasks/quickstart.md b/docs/site/content/zh/latest/tasks/quickstart.md new file mode 100644 index 00000000..0ad04203 --- /dev/null +++ b/docs/site/content/zh/latest/tasks/quickstart.md @@ -0,0 +1,9 @@ +--- +title: "快速入门" +weight: 1 +description: 只需几个简单的步骤即可开始使用 API Testing。 +--- + +本指南将帮助您通过几个简单的步骤开始使用 API Testing。 + +// TBD diff --git a/docs/secure-zh.md b/docs/site/content/zh/latest/tasks/secure-zh.md similarity index 97% rename from docs/secure-zh.md rename to docs/site/content/zh/latest/tasks/secure-zh.md index c2eee33b..6e65b24a 100644 --- a/docs/secure-zh.md +++ b/docs/site/content/zh/latest/tasks/secure-zh.md @@ -1,4 +1,6 @@ -# 关于安全 ++++ +title = "关于安全" ++++ 通常在不使用 TLS 证书认证时,gRPC 客户端与服务端之间进行的是明文通信,信息易被第三方监听或篡改。所以大多数情况下均推荐使用 SSL/TLS 保护 gRPC 服务。目前`atest`已实现服务端 TLS,双向 TLS(mTLS) 需等待后续实现。 diff --git a/docs/site/content/zh/news/_index.md b/docs/site/content/zh/news/_index.md new file mode 100644 index 00000000..9f07d996 --- /dev/null +++ b/docs/site/content/zh/news/_index.md @@ -0,0 +1,12 @@ ++++ +title = "新闻" +linktitle = "新闻" +description = "有关 API Testing 的新闻" + +[[cascade]] +type = "docs" ++++ + +这是**新闻**部分。它分为三个类别:博客、演讲和发布。 + +这些目录中的文件将按时间倒序列出。 diff --git a/docs/site/content/zh/news/blogs/_index.md b/docs/site/content/zh/news/blogs/_index.md new file mode 100644 index 00000000..f50dbccf --- /dev/null +++ b/docs/site/content/zh/news/blogs/_index.md @@ -0,0 +1,8 @@ ++++ +title = "博客" +description = "关于 API Testing 的博客" +linktitle = "博客" + +[[cascade]] +type = "docs" ++++ diff --git a/docs/glcc-2023-announce.md b/docs/site/content/zh/news/blogs/glcc-2023-announce.md similarity index 97% rename from docs/glcc-2023-announce.md rename to docs/site/content/zh/news/blogs/glcc-2023-announce.md index 06e2f448..572ecb06 100644 --- a/docs/glcc-2023-announce.md +++ b/docs/site/content/zh/news/blogs/glcc-2023-announce.md @@ -1,3 +1,8 @@ ++++ +title = "很荣幸与屈晗煜在 GitLink 编程夏令营(GLCC)活动中协作" +weight = -99 ++++ + 很荣幸与屈晗煜在 GitLink 编程夏令营(GLCC)活动中协作 作为一名软件工程师,天然有着追求代码质量的执念。相信很多人对代码的优雅、质量有着自己的认识,业界也有不少的共识,其中有一条我认为是非常重要的——代码可测试。 diff --git a/docs/site/content/zh/news/presentations/_index.md b/docs/site/content/zh/news/presentations/_index.md new file mode 100644 index 00000000..9a5fbc2d --- /dev/null +++ b/docs/site/content/zh/news/presentations/_index.md @@ -0,0 +1,8 @@ ++++ +title = "演讲" +description = "有关 API Testing 的演讲、讲座和活动" +linktitle = "演讲" + +[[cascade]] +type = "docs" ++++ diff --git a/docs/site/content/zh/news/releases/_index.md b/docs/site/content/zh/news/releases/_index.md new file mode 100644 index 00000000..af1c4636 --- /dev/null +++ b/docs/site/content/zh/news/releases/_index.md @@ -0,0 +1,25 @@ ++++ +title = "发布公告" +description = "API Testing 发布公告" +linktitle = "发布" + +[[cascade]] +type = "docs" ++++ + +本文档提供了 API Testing 版本的详细信息。 +API Testing 遵循语义版本控制 [v2.0.0 规范][]进行发布版本控制。 +由于 API Testing 是一个新项目,因此次要版本是唯一被定义的版本。 +API Testing 维护人员在未来的某个日期将建立额外的发布详细信息,例如补丁版本。 + +## 稳定版本 {#stable-releases} + + + +## 发布管理 {#release-management} + + + +## 发布时间表 {#release-schedule} + + diff --git a/docs/site/content/zh/search.md b/docs/site/content/zh/search.md new file mode 100644 index 00000000..5bd7efae --- /dev/null +++ b/docs/site/content/zh/search.md @@ -0,0 +1,4 @@ +--- +title: 搜索结果 +layout: search +--- diff --git a/docs/site/data/adopters.yaml b/docs/site/data/adopters.yaml new file mode 100644 index 00000000..ebd0b9b2 --- /dev/null +++ b/docs/site/data/adopters.yaml @@ -0,0 +1,2 @@ +adopters: + # todo diff --git a/docs/site/docker-compose.yaml b/docs/site/docker-compose.yaml new file mode 100644 index 00000000..e8f211a6 --- /dev/null +++ b/docs/site/docker-compose.yaml @@ -0,0 +1,13 @@ +version: "3.3" + +services: + + site: + image: docsy/docsy-example + build: + context: . + command: server + ports: + - "1313:1313" + volumes: + - .:/src diff --git a/docs/site/go.mod b/docs/site/go.mod new file mode 100644 index 00000000..5850543d --- /dev/null +++ b/docs/site/go.mod @@ -0,0 +1,9 @@ +module github.com/google/docsy-example + +go 1.22.1 + +require ( + github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect + github.com/google/docsy v0.7.1 // indirect + github.com/twbs/bootstrap v5.2.3+incompatible // indirect +) diff --git a/docs/site/go.sum b/docs/site/go.sum new file mode 100644 index 00000000..e1d4ad4d --- /dev/null +++ b/docs/site/go.sum @@ -0,0 +1,22 @@ +github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f h1:bvkUptSRPZBr3Kxuk+bnWCEmQ5MtEJX5fjezyV0bC3g= +github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20221115183454-96cafbd73ec4 h1:xfr9SidRCMEh4A8fdkLhFPcHAVbrdv3Ua0Jp/nSmhhQ= +github.com/FortAwesome/Font-Awesome v0.0.0-20221115183454-96cafbd73ec4/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 h1:Uv1z5EqCfmiK4IHUwT0m3h/u/WCk+kpRfxvAZhpC7Gc= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/google/docsy v0.5.1 h1:D/ZdFKiE29xM/gwPwQzmkyXhcbQGkReRS6aGrF7lnYk= +github.com/google/docsy v0.5.1/go.mod h1:maoUAQU5H/d+FrZIB4xg1EVWAx7RyFMGSDJyWghm31E= +github.com/google/docsy v0.6.0 h1:43bVF18t2JihAamelQjjGzx1vO2ljCilVrBgetCA8oI= +github.com/google/docsy v0.6.0/go.mod h1:VKKLqD8PQ7AglJc98yBorATfW7GrNVsn0kGXVYF6G+M= +github.com/google/docsy v0.7.0 h1:JaeZ0/KufX/BJ3SyATb/fmZa1DFI7o5d9KU+i6+lLJY= +github.com/google/docsy v0.7.0/go.mod h1:5WhIFchr5BfH6agjcInhpLRz7U7map0bcmKSpcrg6BE= +github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY= +github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc= +github.com/google/docsy/dependencies v0.5.1/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= +github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= +github.com/google/docsy/dependencies v0.7.0/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= +github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= +github.com/twbs/bootstrap v4.6.2+incompatible h1:TDa+R51BTiy1wEHSYjmqDb8LxNl/zaEjAOpRE9Hwh/o= +github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/twbs/bootstrap v5.2.3+incompatible h1:lOmsJx587qfF7/gE7Vv4FxEofegyJlEACeVV+Mt7cgc= +github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/docs/site/hugo.toml b/docs/site/hugo.toml new file mode 100644 index 00000000..05e0a682 --- /dev/null +++ b/docs/site/hugo.toml @@ -0,0 +1,284 @@ +baseURL = "/" +title = "API Testing" + +# Language settings +contentDir = "content" +defaultContentLanguage = "zh" +defaultContentLanguageInSubdir = false +# Useful when translating. +enableMissingTranslationPlaceholders = true + +enableRobotsTXT = true + +# Will give values to .Lastmod etc. +enableGitInfo = true + +# Comment out to enable taxonomies in Docsy +# disableKinds = ["taxonomy", "taxonomyTerm"] + +# You can add your own taxonomies +[taxonomies] +tag = "tags" +category = "categories" + +[params.taxonomy] +# set taxonomyCloud = [] to hide taxonomy clouds +taxonomyCloud = ["tags", "categories"] + +# If used, must have same length as taxonomyCloud +taxonomyCloudTitle = ["Tag Cloud", "Categories"] + +# set taxonomyPageHeader = [] to hide taxonomies on the page headers +taxonomyPageHeader = ["tags", "categories"] + +# Highlighting config +pygmentsCodeFences = true +pygmentsUseClasses = false +# Use the new Chroma Go highlighter in Hugo. +pygmentsUseClassic = false +#pygmentsOptions = "linenos=table" +# See https://help.farbox.com/pygments.html +pygmentsStyle = "tango" + +# Configure how URLs look like per section. +[permalinks] +blog = "/:section/:year/:month/:day/:slug/" + +# Image processing configuration. +[imaging] +resampleFilter = "CatmullRom" +quality = 75 +anchor = "smart" + +[services] +[services.googleAnalytics] +# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback]. +id = "UA-00000000-0" + +# Language configuration + +[languages] + + [languages.zh] + contentDir = "content/zh" + languageName = "中文" + # Weight used for sorting. + weight = 1 + [languages.zh.params] + title = "API Testing" + description = "开源的接口调试 & 测试工具" + + [languages.en] + contentDir = "content/en" + languageName ="English" + # Weight used for sorting. + weight = 2 + [languages.en.params] + title = "API Testing" + description = "YAML based API testing tool. Open source interface debug and test tools." + +[markup] + [markup.goldmark] + [markup.goldmark.parser.attribute] + block = true + [markup.goldmark.renderer] + unsafe = true + [markup.highlight] + # See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html + style = "tango" + # Uncomment if you want your chosen highlight style used for code blocks without a specified language + # guessSyntax = "true" + +# Everything below this are Site Params + +# Comment out if you don't want the "print entire section" link enabled. +[outputs] +section = ["HTML", "print", "RSS"] + +[params] +copyright = "The API Testing Authors" + + +# First one is picked as the Twitter card image if not set on page. +# images = ["images/project-illustration.png"] + +# Menu title if your navbar has a versions selector to access old versions of your site. +# This menu appears only if you have at least one [params.versions] set. +version_menu = "Versions" + +# Flag used in the "version-banner" partial to decide whether to display a +# banner on every page indicating that this is an archived version of the docs. +# Set this flag to "true" if you want to display the banner. +archived_version = false + +# The version number for the version of the docs represented in this doc set. +# Used in the "version-banner" partial to display a version number for the +# current doc set. +version = "latest" + +# A link to latest version of the docs. Used in the "version-banner" partial to +# point people to the main doc site. +url_latest_version = "https://api-testing.io" + +# Repository configuration (URLs for in-page links to opening issues and suggesting changes) +github_repo = "https://github.com/LinuxSuRen/api-testing/" +# An optional link to a related project repo. For example, the sibling repository where your product code lives. +github_project_repo = "https://github.com/LinuxSuRen/api-testing/" + +# Specify a value here if your content directory is not in your repo's root directory +github_subdir = "/site/" + +# Uncomment this if your GitHub repo does not have "main" as the default branch, +# or specify a new value if you want to reference another branch in your GitHub links +github_branch= "main" + +# Google Custom Search Engine ID. Remove or comment out to disable search. +# gcs_engine_id = "d72aa9b2712488cc3" + +# Enable Algolia DocSearch +algolia_docsearch = false + +# Enable Lunr.js offline search +offlineSearch = true + +# Enable syntax highlighting and copy buttons on code blocks with Prism +prism_syntax_highlighting = false + +# User interface configuration +[params.ui] +# Set to true to disable breadcrumb navigation. +breadcrumb_disable = false +# Set to true to disable the About link in the site footer +footer_about_disable = false +# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar +navbar_logo = true +# Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage. +navbar_translucent_over_cover_disable = false +# Enable to show the side bar menu in its compact state. +sidebar_menu_compact = true +# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) +sidebar_search_disable = false +# Show expand/collapse icon for sidebar sections +sidebar_menu_foldable = true + +# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events. +# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set. +# If you want this feature, but occasionally need to remove the "Feedback" section from a single page, +# add "hide_feedback: true" to the page's front matter. +[params.ui.feedback] +enable = true +# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). +yes = 'Glad to hear it! Please tell us how we can improve.' +no = 'Sorry to hear that. Please tell us how we can improve.' + +# Adds a reading time to the top of each doc. +# If you want this feature, but occasionally need to remove the Reading time from a single page, +# add "hide_readingtime: true" to the page's front matter +[params.ui.readingtime] +enable = true + +# hugo module configuration + +[module] + # uncomment line below for temporary local development of module + # replacements = "github.com/LinuxSuRen/api-testing -> ../../docsy" + [module.hugoVersion] + extended = true + min = "0.110.0" + [[module.imports]] + path = "github.com/google/docsy" + disable = false + [[module.imports]] + path = "github.com/google/docsy/dependencies" + disable = false + +[params.links] + # End user relevant links. These will show up on left side of footer and in the community page if you have one. + [[params.links.user]] + name = "User mailing list" + url = "https://groups.google.com/g/api-testing-tech" + icon = "fa fa-envelope" + desc = "Discussion and help from your fellow users" + [[params.links.user]] + name ="Twitter" + url = "https://twitter.com/apitesting" + icon = "fab fa-twitter" + desc = "Follow us on Twitter to get the latest news!" + # Developer relevant links. These will show up on right side of footer and in the community page if you have one. + [[params.links.developer]] + name = "GitHub" + url = "https://github.com/LinuxSuRen/api-testing" + icon = "fab fa-github" + desc = "Development takes place here!" + [[params.links.developer]] + name = "Slack" + url = "https://apitesting.slack.com/archives/C03E6NHLESV" + icon = "fab fa-slack" + desc = "Chat with other project developers" + + # i18n for Chinese + [[languages.zh.params.links.user]] + name = "邮件列表" + url = "https://groups.google.com/g/api-testing-tech" + icon = "fa fa-envelope" + desc = "来自其他用户的讨论和帮助" + [[languages.zh.params.links.user]] + name ="推特" + url = "https://twitter.com/apitesting" + icon = "fab fa-twitter" + desc = "在 Twitter 上关注我们以获取最新消息!" + [[languages.zh.params.links.developer]] + name = "GitHub" + url = "https://github.com/LinuxSuRen/api-testing" + icon = "fab fa-github" + desc = "在这里进行开发!" + [[languages.zh.params.links.developer]] + name = "Slack" + url = "https://apitesting.slack.com/archives/C03E6NHLESV" + icon = "fab fa-slack" + desc = "与其他项目开发人员沟通" + +[menu] + [[menu.main]] + name = "Contributions" + weight = -98 + url = "/contributions" + [[menu.main]] + name = "About" + weight = -100 + url = "/about" + [[menu.main]] + name = "News" + weight = -101 + url = "/news" + [[menu.main]] + name = "Documentation" + weight = -102 + url = "/v0.0.1" + + # i18n for Chinese + [[languages.zh.menu.main]] + name = "贡献" + weight = -98 + url = "/contributions" + [[languages.zh.menu.main]] + name = "关于" + weight = -100 + url = "/about" + [[languages.zh.menu.main]] + name = "新闻" + weight = -101 + url = "/news" + [[languages.zh.menu.main]] + name = "文档" + weight = -102 + url = "/latest" + +[[params.versions]] + version = "latest" + url = "/latest" + +[[params.versions]] + version = "v0.0.1" + url = "/v0.0.1" + \ No newline at end of file diff --git a/docs/site/layouts/404.html b/docs/site/layouts/404.html new file mode 100644 index 00000000..d32828c8 --- /dev/null +++ b/docs/site/layouts/404.html @@ -0,0 +1,6 @@ +{{ define "main" -}} +Oops! This page doesn't exist. Try going back to the home page.
+{{ .description }}
+