Skip to content

Releases: pb33f/libopenapi-validator

v0.1.0

09 Jul 15:18
Compare
Choose a tag to compare

This is a breaking change release that refines some of the behavior of the library.

SetPathItem was removed from the parameter validation. It was causing race conditions.

The FindPath method no-longer performs any validation, it was a mix of concerns.

@emilien-puget

v0.0.56

08 May 17:02
Compare
Choose a tag to compare

Addresses a panic when response code ranges are used, also addresses issue #78 where missing path params were being ignored.

@k1LoW @budanm

v0.0.55

04 May 13:12
Compare
Choose a tag to compare

Adds a new synchronous version of ValidateHttpRequest called ValidateHttpRequestSync

#79

@commoddity

v0.0.54

01 May 19:04
Compare
Choose a tag to compare

Fixes an issue with parameter schema validation was not rendering inline, so $ref values were not being resolved correctly.

Also bumps libopenapi version.

v0.0.53

30 Apr 14:32
Compare
Choose a tag to compare

Fixes issue with body validation.

v0.0.52

29 Apr 16:18
Compare
Choose a tag to compare

Fixes an issue with path param validation that didn't pass through the rendered schema with the validation error.

Also added in a couple of nil pointer exception catches and bumped deps.

No new features.

v0.0.51

28 Apr 13:36
Compare
Choose a tag to compare
  1. Introduces improved error handling for the JSON schema compilation process in the request validation logic. Previously, the code did not handle potential errors from the compiler, which caused the code to panic when attempting to validate the request body.

The change will improve reliability by ensuring that schema compilation errors are gracefully handled, thus improving the stability of the request body schema validation process. Additionally, this will facilitate quicker debugging and resolution of issues related to invalid schemas.

  1. Request bodies are optional by default.
    see https://spec.openapis.org/oas/v3.1.0#fixed-fields-10 or https://swagger.io/docs/specification/describing-request-body/
    this dear library doesn't handle such cases
    https://github.com/pb33f/libopenapi-validator/blob/688b7a2e81d820bed7d96b28af6fdebd3d52cea9/requests/validate_body.go#L41

as we can see above, if an operation has a request body, we will require to have a content type set, however that request body could be not required which means that a content type should not be required.

@martinsirbe @emilien-puget

v0.0.50

25 Apr 14:38
Compare
Choose a tag to compare

Moved internal cache to sync.Map in response body validator

url.Parse does not handle special characters well.

Some openapi server configurations will have variable templating (ie. {host}). Adds a second parsing attempt if the initial attempt fails by attempting to remove the host.

@jacobm-splunk @k1LoW

v0.0.49

21 Apr 14:22
Compare
Choose a tag to compare

This fix supports the range definition for response codes.

ref: https://swagger.io/docs/specification/describing-responses/

Also fixes a race condition discovered in vacuum when running tests

Response code range fix added by @k1LoW

v0.0.48

12 Apr 18:17
Compare
Choose a tag to compare

Added the following properties to ValidationError

SpecPath = the spec path of the error
RequestMethod = HTTP verb used in the error
RequestPath = HTTP path used in the error

@jacobm-splunk