Skip to content

[TT-16113] Update kin-openAPI to 0.133.0#6

Merged
lghiur merged 181 commits intomasterfrom
TT-16113-tyk-v0.133.0-x2
Dec 4, 2025
Merged

[TT-16113] Update kin-openAPI to 0.133.0#6
lghiur merged 181 commits intomasterfrom
TT-16113-tyk-v0.133.0-x2

Conversation

@lghiur
Copy link
Collaborator

@lghiur lghiur commented Dec 3, 2025

https://tyktech.atlassian.net/browse/TT-16113

Updates Tyk fork of kin-openapi to latest version (v 0.133.0)

zekth and others added 30 commits March 24, 2023 12:53
Co-authored-by: mgianluc <mgianluca@cisco.com>
…tkin#811)

Co-authored-by: radwaretaltr <119794762+radwaretaltr@users.noreply.github.com>
)

Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com>
tatsumack and others added 20 commits March 10, 2025 14:00
* replicate issue 1051

* remove pre-existing origin keys iff IncludeOrigin=true

* update docs

* fix raw quotes

* udpate unit tests
…h exploded = false (getkin#1054)

* issue1053: apply default values of an array in a query param with exploded set to false

* issue1053: apply default values of an array in a query param with exploded set to false

* issue1053: apply default values of an array in a query param with exploded set to false

* add test case with explode set to true

* refactor code
…s public (getkin#1059)

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
* style: Use fmt.Sprint without formating

* fix pipeline
…tkin#1064)

As noted in getkin#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 getkin#743.

[0]: https://gitlab.com/jamietanna/httptest-openapi/-/issues/5
…kin#1067)

* Introduce fix for refs on items within additional properties

* Remove space

---------

Co-authored-by: Robert Hoppe <robert.hoppe@mail.schwarz>
Co-authored-by: Seb Chatal <8210110+seborama@users.noreply.github.com>
…ing validation (getkin#1068)

* fix: replace bigfloat with decimal128

* update tests
* Fix openapi regex caching.

* Remove stray line
…ary (getkin#1088)

* use FileBodyDecoder if the format is specified as binary

* added tests

* clean up zip test

* Update openapi3filter/req_resp_decoder.go

---------

Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com>
Previously, only the first error would be reported
…rts in multipart/form-data (getkin#1090)

* Add primitive parsing

* fix check

---------

Co-authored-by: Nathan Meheus <nathan@mylighthouse.com>
* openapi3filter: some coding style fixes

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>

* aannd more cleaning up

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>

---------

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
…#1092)

* Fix: Preserve extensions (like x-order) when converting OpenAPI v2 to v3

This commit fixes an issue where schema property-level extensions
such as x-order were being lost during OpenAPI v2 to v3 conversion.

The problem was in the ToV3SchemaRef function where schema.Extensions
was being assigned to v3Schema.Extensions instead of schema.Value.Extensions.
This meant that only SchemaRef-level extensions were preserved, but not
the actual schema property extensions.

Changes:
- Modified ToV3SchemaRef to properly copy schema.Value.Extensions
- Added comprehensive tests to verify extension preservation
- Ensured both schema-level and property-level extensions are maintained
- Verified nested properties also preserve their extensions

Fixes getkin#1091

* fix: remove the unnecessary copy loop

Signed-off-by: saltbo <saltbo@foxmail.com>

---------

Signed-off-by: saltbo <saltbo@foxmail.com>
@lghiur lghiur changed the title Tt 16113 tyk v0.133.0 x2 [TT-16113] Update kin-openAPI to 0.133.0 Dec 3, 2025
@lghiur lghiur merged commit ff57f1d into master Dec 4, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.