From 9ed87ab328154f5d4999931aacb422c7ec72d386 Mon Sep 17 00:00:00 2001 From: Keming Date: Thu, 3 Sep 2026 01:03:57 +0800 Subject: [PATCH] chore: add typos ci, fix typos in readme Signed-off-by: Keming --- .github/workflows/codeql.yml | 6 +++--- .github/workflows/pythondoc.yml | 5 ++++- README.md | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a357627a..3388ae4c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -32,15 +32,15 @@ jobs: persist-credentials: false - name: Initialize CodeQL - uses: github/codeql-action/init@18420e3271f74589575af831a523c833acda327f # codeql-bundle-v2.26.2 + uses: github/codeql-action/init@486fec2a3ea2626afcd8c7e9208b4f515078dd7e # codeql-bundle-v2.26.4 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@18420e3271f74589575af831a523c833acda327f # codeql-bundle-v2.26.2 + uses: github/codeql-action/autobuild@486fec2a3ea2626afcd8c7e9208b4f515078dd7e # codeql-bundle-v2.26.4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@18420e3271f74589575af831a523c833acda327f # codeql-bundle-v2.26.2 + uses: github/codeql-action/analyze@486fec2a3ea2626afcd8c7e9208b4f515078dd7e # codeql-bundle-v2.26.4 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/pythondoc.yml b/.github/workflows/pythondoc.yml index 0fd7f197..165ac4bb 100644 --- a/.github/workflows/pythondoc.yml +++ b/.github/workflows/pythondoc.yml @@ -10,6 +10,7 @@ on: - 'docs/**' - '.github/workflows/pythondoc.yml' - 'examples/**' + - 'README.md' push: branches: - master @@ -19,6 +20,7 @@ on: - 'docs/**' - '.github/workflows/pythondoc.yml' - 'examples/**' + - 'README.md' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -36,6 +38,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + - uses: crate-ci/typos@d43b6c087ac471e2ea7b8af622ff15f05c0c365b # v1.50.1 - name: Setup Pages uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 - name: Install uv @@ -67,4 +70,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/README.md b/README.md index 044d14c4..748e8444 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ Add `skip_validation=True` to the decorator. Before v1.3.0, this only skip the response validation. -Starts from v1.3.0, this will skip all the validations. As an result, you won't be able to access the validated data from `context`. +Starts from v1.3.0, this will skip all the validations. As a result, you won't be able to access the validated data from `context`. ```py @spec.validate(json=Profile, resp=Response(HTTP_200=Message, HTTP_403=None), skip_validation=True) @@ -216,7 +216,7 @@ The OpenAPI endpoints are added by `spec.register(app)`. If you don't want to ad For secure API endpoints, it is needed to define the `security_schemes` argument in the `SpecTree` constructor. `security_schemes` argument needs to contain an array of `SecurityScheme` objects. Then there are two ways to enforce security: -1. You can enforce security on individual API endpoints by defining the `security` argument in the `spec.validate` decorator of relevant function/method (this corresponds to define security section on operation level, under `paths`, in `OpenAPI`). `security` argument is defined as a dictionary, where each key is the name of security used in `security_schemes` argument of `SpecTree` constructor and its value is required security scope, as is showed in the following example: +1. You can enforce security on individual API endpoints by defining the `security` argument in the `spec.validate` decorator of relevant function/method (this corresponds to define security section on operation level, under `paths`, in `OpenAPI`). `security` argument is defined as a dictionary, where each key is the name of security used in `security_schemes` argument of `SpecTree` constructor and its value is required security scope, as is shown in the following example:
Click to expand the code example: