Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: go-openapi/errors
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.22.0
Choose a base ref
...
head repository: go-openapi/errors
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.22.1
Choose a head ref
  • 10 commits
  • 13 files changed
  • 3 contributors

Commits on Mar 22, 2024

  1. Bump the development-dependencies group with 1 update

    Bumps the development-dependencies group with 1 update: [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata).
    
    
    Updates `dependabot/fetch-metadata` from 1 to 2
    - [Release notes](https://github.com/dependabot/fetch-metadata/releases)
    - [Commits](dependabot/fetch-metadata@v1...v2)
    
    ---
    updated-dependencies:
    - dependency-name: dependabot/fetch-metadata
      dependency-type: direct:production
      update-type: version-update:semver-major
      dependency-group: development-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and github-actions[bot] committed Mar 22, 2024
    Copy the full SHA
    0f7155e View commit details

Commits on Apr 26, 2024

  1. Bump golangci/golangci-lint-action in the development-dependencies group

    Bumps the development-dependencies group with 1 update: [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action).
    
    
    Updates `golangci/golangci-lint-action` from 4 to 5
    - [Release notes](https://github.com/golangci/golangci-lint-action/releases)
    - [Commits](golangci/golangci-lint-action@v4...v5)
    
    ---
    updated-dependencies:
    - dependency-name: golangci/golangci-lint-action
      dependency-type: direct:production
      update-type: version-update:semver-major
      dependency-group: development-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and github-actions[bot] committed Apr 26, 2024
    Copy the full SHA
    3383787 View commit details

Commits on May 10, 2024

  1. Bump golangci/golangci-lint-action in the development-dependencies group

    Bumps the development-dependencies group with 1 update: [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action).
    
    
    Updates `golangci/golangci-lint-action` from 5 to 6
    - [Release notes](https://github.com/golangci/golangci-lint-action/releases)
    - [Commits](golangci/golangci-lint-action@v5...v6)
    
    ---
    updated-dependencies:
    - dependency-name: golangci/golangci-lint-action
      dependency-type: direct:production
      update-type: version-update:semver-major
      dependency-group: development-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and github-actions[bot] committed May 10, 2024
    Copy the full SHA
    8b2421c View commit details

Commits on Nov 15, 2024

  1. Bump codecov/codecov-action in the development-dependencies group

    Bumps the development-dependencies group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action).
    
    
    Updates `codecov/codecov-action` from 4 to 5
    - [Release notes](https://github.com/codecov/codecov-action/releases)
    - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
    - [Commits](codecov/codecov-action@v4...v5)
    
    ---
    updated-dependencies:
    - dependency-name: codecov/codecov-action
      dependency-type: direct:production
      update-type: version-update:semver-major
      dependency-group: development-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and github-actions[bot] committed Nov 15, 2024
    Copy the full SHA
    ea38843 View commit details

Commits on Nov 29, 2024

  1. Bump github.com/stretchr/testify from 1.9.0 to 1.10.0

    Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
    - [Release notes](https://github.com/stretchr/testify/releases)
    - [Commits](stretchr/testify@v1.9.0...v1.10.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/stretchr/testify
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 29, 2024
    Copy the full SHA
    5dbcd15 View commit details

Commits on Dec 2, 2024

  1. Merge pull request #56 from go-openapi/dependabot/go_modules/github.c…

    …om/stretchr/testify-1.10.0
    
    Bump github.com/stretchr/testify from 1.9.0 to 1.10.0
    youyuanwu authored Dec 2, 2024
    Copy the full SHA
    527c738 View commit details

Commits on Mar 11, 2025

  1. Relinting

    * fixed linter config
    * relinted
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi committed Mar 11, 2025
    Copy the full SHA
    5ea0a35 View commit details
  2. fixed dependabot auto-merge

    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi committed Mar 11, 2025
    Copy the full SHA
    2611335 View commit details

Commits on Mar 16, 2025

  1. ci: fixed broken codecov coverage upload

    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi committed Mar 16, 2025
    Copy the full SHA
    bfda7b0 View commit details

Commits on Mar 17, 2025

  1. ci: fixed codecov upload

    Fixed broken test coverage upload to codecov with codecov-action@v5.
    
        * fixed tokenless upload (now supported with codecov v5)
        * fixed flags for codecov
        * fixed coverage for windows (now use bash instead of powershell)
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    fredbi committed Mar 17, 2025
    Copy the full SHA
    470ae20 View commit details
Showing with 252 additions and 197 deletions.
  1. +2 −2 .github/workflows/auto-merge.yml
  2. +7 −8 .github/workflows/go-test.yml
  3. +12 −19 .golangci.yml
  4. +1 −1 api.go
  5. +164 −108 api_test.go
  6. +1 −1 go.mod
  7. +2 −2 go.sum
  8. +1 −1 headers.go
  9. +1 −1 middleware.go
  10. +2 −1 parsing.go
  11. +1 −0 parsing_test.go
  12. +57 −53 schema.go
  13. +1 −0 schema_test.go
4 changes: 2 additions & 2 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@ permissions:
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2

- name: Auto-approve all dependabot PRs
run: gh pr review --approve "$PR_URL"
15 changes: 7 additions & 8 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ jobs:
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
@@ -37,22 +37,21 @@ jobs:
go_version: ['oldstable', 'stable' ]

steps:
- name: Run unit tests
uses: actions/setup-go@v5
- uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go_version }}'
check-latest: true
cache: true

- uses: actions/checkout@v4

- run: go test -v -race -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic -coverpkg=$(go list)/... ./...
- name: Run unit tests
shell: bash
run: go test -v -race -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic -coverpkg=$(go list)/... ./...

- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: './coverage-${{ matrix.os }}.${{ matrix.go_version }}.out'
flags: '${{ matrix.go_version }}'
os: '${{ matrix.os }}'
flags: '${{ matrix.go_version }}-${{ matrix.os }}'
fail_ci_if_error: false
verbose: true
31 changes: 12 additions & 19 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 45
maligned:
suggest-new: true
dupl:
threshold: 200
goconst:
@@ -16,8 +10,6 @@ linters-settings:
linters:
enable-all: true
disable:
- errname # this repo doesn't follow the convention advised by this linter
- maligned
- unparam
- lll
- gochecknoinits
@@ -30,17 +22,13 @@ linters:
- wrapcheck
- testpackage
- nlreturn
- gomnd
- exhaustivestruct
- goerr113
- errorlint
- nestif
- godot
- gofumpt
- paralleltest
- tparallel
- thelper
- ifshort
- exhaustruct
- varnamelen
- gci
@@ -53,10 +41,15 @@ linters:
- forcetypeassert
- cyclop
# deprecated linters
- deadcode
- interfacer
- scopelint
- varcheck
- structcheck
- golint
- nosnakecase
#- deadcode
#- interfacer
#- scopelint
#- varcheck
#- structcheck
#- golint
#- nosnakecase
#- maligned
#- goerr113
#- ifshort
#- gomnd
#- exhaustivestruct
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
@@ -185,7 +185,7 @@ func ServeError(rw http.ResponseWriter, r *http.Request, err error) {
}

func asHTTPCode(input int) int {
if input >= 600 {
if input >= maximumValidHTTPCode {
return DefaultHTTPCode
}
return input
Loading