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: getkin/kin-openapi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.131.0
Choose a base ref
...
head repository: getkin/kin-openapi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.132.0
Choose a head ref
  • 3 commits
  • 10 files changed
  • 4 contributors

Commits on Mar 29, 2025

  1. style: Use fmt.Sprint without formating (#1061)

    * style: Use fmt.Sprint without formating
    
    * fix pipeline
    gaiaz-iusipov authored Mar 29, 2025
    Configuration menu
    Copy the full SHA
    3cf8f7d View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2025

  1. openapi3filter: don't consume request body in AuthenticatorFunc (#1064

    )
    
    As noted in #743, some users of the `openapi3filter`, largely via
    `oapi-codegen` and `openapi.tanna.dev/go/validator`[0] are seeing that
    when using an `AuthenticationFunc`, this can lead to errors such as:
    
        request body has an error: value is required but missing
    
    Or:
    
        request body has an error: reading failed: http: invalid Read on closed Body
    
    This turns out to be down to the fact that a call to the
    `AuthenticationFunc` may read the request body, but due to the way that
    Go's `io.Reader`s can only be read once, this then means the body cannot
    be read by anyone else further in the request chain.
    
    To resolve this, we can make sure that each iteration of the
    `AuthenticationFunc` gets a fresh copy of the request body (in its own
    `io.Reader`).
    
    This follows logic that exists within the `ValidateRequestBody` method,
    with an additional layer of caching the raw bytes from the body.
    
    We also add tests to validate:
    
    - calling the `ValidateRequest` body function with an
      `AuthenticationFunc` that reads the request body
    - using an integration test with a test HTTP server also works,
      indicating that the HTTP handler can then read the request body itself
    
    Closes #743.
    
    [0]: https://gitlab.com/jamietanna/httptest-openapi/-/issues/5
    jamietanna authored Apr 7, 2025
    Configuration menu
    Copy the full SHA
    75e2cc5 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2025

  1. openapi2conv: fix for refs on items within additional properties (#1067)

    * Introduce fix for refs on items within additional properties
    
    * Remove space
    
    ---------
    
    Co-authored-by: Robert Hoppe <robert.hoppe@mail.schwarz>
    roberth1988 and Robert Hoppe authored Apr 29, 2025
    Configuration menu
    Copy the full SHA
    72b5d51 View commit details
    Browse the repository at this point in the history
Loading