Skip to content

Releases: stoplightio/prism

v3.2.1

28 Nov 16:36
Compare
Choose a tag to compare

Fixed

  • Put chalk as an explicit dependency in the CLI package #854
  • Make sure callbacks work on application/x-www-form-urlencoded data #856

v3.2.0

21 Nov 18:06
Compare
Choose a tag to compare

Added

  • Prism now includes a new proxy command that will validate the request coming in, send the request to an upstream server and then validate the response coming back #669
  • Prism has now support for OpenAPI 3.0 callbacks #716
  • Support for encoding > allowReserved flag when validating application/x-www-form-urlencoded body #630
  • Validating output status code against available response specs #648
  • Support for Contract Testing #650
  • The CLI will now propose operation paths with meaningful examples #671
  • Prism reloads itself every time there are changes being made to the specified document #689
  • Path parameters are now validated against schema #702
  • CLI now displays a timestamp for all the logged operations #779
  • Prism body validator will now show allowed enum parameters in error messages #828

Fixed

  • Killing sub-process only if Prism is running in multi-process mode #645
  • UUIDs are never generated as URNs #661
  • Relative references for remote documents are now resolved correctly #669
  • Core types are now correctly referenced in the HTTP package, restoring the type checks when using the package separately #701
  • By upgrading Json Schema Faker to the latest version, now the schemas with additionalProperties:false / additionalProperties:true / additionalProperties:object will be correctly handled when dynamic mocking is enabled #719
  • Making a request to an operation with a deprecated parameter is no longer causing Prism to return a 422 response #721
  • The access-control-allow-origin header, when CORS is enabled, will now reflect the request origin AND set the Credentials header #797
  • When the request is missing the Accept header, Prism will now effectively treat it as a */*, according to the respective RFC #802
  • Prism will now passthrough as response anything that matches text/* instead of only text/plain #796

v3.1.1

23 Sep 13:26
Compare
Choose a tag to compare

Fixed

  • Prism is now giving precedence to application/json instead of using it as a "fallback" serializer, fixing some conditions where it wouldn't get triggered correctly. #604
  • Prism is now taking in consideration the required properties for combined schemas (oneOf, allOf). This is coming through an update to the Json Schema Faker Library #623
  • Prism will never have enough information to return a 403 status code; all these occurences have been now replaced with a 401 status code which is more appropriate #625
  • Prism is now negotiating the error response dynamically based on the validation result (security or schema validation) instead of always returning a static order of responses #628
  • Prism is now selecting proper serializer when Accept header contains content type which is missing in spec. This is a result of simplifying serializer selection approach. #620
  • HEAD requests no longer fail with 406 Not Acceptable #603

v3.1.0

03 Sep 09:11
Compare
Choose a tag to compare

Added

  • Prism is now able to validate the security specification of the loaded document #484

Fixed

  • Prism is not crashing anymore when referencing the same model multiple times in the specification document #552
  • Prism will now correctly use the example keyword for a Schema Object in OpenAPI 3.0 documents #560
  • Prism won't return 406 when users request a text/plain response whose content is a primitive (string, number) #560
  • Prism's router is now able to correctly handle a path ending with a parameter, such as /test.{format}, while it would previously not match with anything. #561
  • Prism is correctly handling the allowEmptyValue property in OAS2 documents #569
  • Prism is correctly handling the csv collection format argument property in OAS2 documents #577
  • Prism is correctly returning the response when the request has */* as Accept header #578
  • Prism is correctly returning a single root node with the payload for XML data #578

v3.0.4

20 Aug 14:26
Compare
Choose a tag to compare

Added

  • Prism is now returning CORS headers by default and responding to all the preflights requests. You can disable this behaviour by running Prism with the --cors flag set to false #525

Fixed

  • Prism now respects the nullable value for OpenAPI 3.x documents when generating examples #506
  • Prism now loads correctly OpenAPI 3.x documents with encodings with non specified style property #507
  • Prism got rid of some big internal dependencies that now aren't required anymore, making it faster and lighter. #490
  • Prism now correctly validates OAS2 application/x-www-urlencoded (form data) params (#483)

v3.0.3

25 Jul 11:37
Compare
Choose a tag to compare

Fixed

  • Return 406 error instead of an empty response in case it is not able to find a response whose content type satisfies the provided Accept Header
  • Respect q value in the Accept header to specify the content type preference
  • Return text/plain when the document does not specify any Content Type for the examples
  • Return the example according to the Accept header for OAS2 documents
  • Return 404 instead of 500 in case the requested named example does not exist in the document

Changed

  • Prism HTTP Client is now adding 'user-agent' header with Prism/<<PRISM_VERSION>> as the value when making HTTP requests
  • Prism is now using yargs for its command line interface, replacing oclif.

v2.0.21

17 Jul 21:25
Compare
Choose a tag to compare

Overview

  • Fix int32 and int64 format validation

v3.0.1

16 Jul 12:21
Compare
Choose a tag to compare

We are excited to announce the release of Prism v3, which contains significant upgrades, including:

  • support for OpenAPI 3.0.x (in addition to 2.0)
  • fully open-source, we’ve already got quite a few community contributions
  • more dynamic example responses
  • detailed logging, including for failed requests
  • a huge jump in request volume for your mock API
  • rewrite in TypeScript

v2.0.20

25 Apr 20:51
Compare
Choose a tag to compare

Overview

  • consistent mock results, fixes #264

v2.0.19

24 Apr 19:03
Compare
Choose a tag to compare

Overview

  • #261 Fix query string validation