All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- 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
- The Test Harness framework now requires the
${document}
parameter explicitly #720 - 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 values for path/query params bolded and in color #743
- 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
- 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 a401
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
- Prism is now able to validate the security specification of the loaded document #484
- 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
- Prism is correctly returning payload-less responses #606
- 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
- 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 specifiedstyle
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)
- Prism is now returning a
406
error instead of an empty response in case it is not able to find a response whose content type satisfies the providedAccept
Header - Prism now respects the
q
value in theAccept
header to specify the content type preference - Prism is now returning
text/plain
when the document does not specify any Content Type for the examples - Prism is now returning the example according to the
Accept
header for OAS2 documents - Prism is now returning
404
instead of500
in case the requested named example does not exist in the document
- 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.
- Fixed an error in the JSON Path bundling for NPM Package download
This is nothing more than the beta 6 rebranded.
- Prism now loads correctly files from the internet with urls using query parameters #452
- Prism now correctly respects the
required
property in OpenAPI 2 body parameters #450 - Prism now validates any payload, as long it has a schema and it's parsable #446
- Prism now will tell you explicitly when a response has been constructed from a
default
response definition #445
- Internal refactoring: Prism validation process is now completely sync #400
- Prism examples generator supports
x-faker
extensions #384 — thanks @vanhoofmaarten! - Documentation reorganisation #393
- Introduced Azure Pipelines to make sure Prism works on Windows #388
- Prism has now a diagram in the readme that shows you the mocker flow #386
- Several improvements to the logging of the Http Mocker #382
- Our
application/vnd+problem.json
messages have been improved #370
- Prism is now able to parse HTTP FormData payloads #381
- Prism now works correctly on Windows thanks to some internal libraries updates #374
- Prism 3 has now a Docker Image; you can try it at
stoplight/prism:3
- Static JSON Schema examples generator gives precendece to
default
overexamples
#373
-
Prism is now logging all the negotiator phases for a better observability #323
-
The HTTP Client API has been documented #355
- Prism's build process in TypeScript has been revisited #356
- Prism can now validate servers #351
- Prism's build process received some tweaks, but there's more work to do #352
- Prism now has got a static example fallback in case the
dynamic
flag is not enabled #347
- Prism is now handling the fact that HTTP headers are case insensitive #338
- Prism is now normalising OAS2/3 schemas improving and simplyfing the validation capabilites #338
- Prism is not able to correctly handle the Content Type header #344
- Prism CLI has now a new CLI option to specify the IP Address where it will listen connections for #340
- Fixed the security issue intrisic in Axios by updating its dependency in the project #334
- Fix a bug where paremeters where undetected, returning a REQUIERD error #325
- Respect the
Accept
header when requesting content to Prism #333 - Create a LICENSE file for the project #330
- Add new GitHub ISSUES template files for the project #326
- Decouple payload generation from its serialisation #322
- a bug where http operations were not resolved (6aee679)
- add missing referenced project (7621f8a)
- add tsconfig paths to make the CLI work natively in TS SL-2369 (#219) (30298a9)
- correctly install dependencies (#302) (d3de5b1)
- dependencies (ebd2536)
- do not overwrite the default config object (bcb20f5)
- do not throw when you can't find an example (06f9435)
- error serialisation SO-195 (#274) (1199919)
- get rid of ajv console warn (b11cd48)
- get rid of resolutions (#289) (758cbfa)
- it's ok if we do not have examples or schemas (5a93f1d)
- look for 422 for invalid requests (#278) (7a1c073)
- make jest faster in startup and runtime (d9b6c2a)
- make sure http download works (#276) (01828f3)
- OAS3 integration tests and fixes SO-103 (#253) (930d29e)
- prism forwarder can work without an API in place [SL-1619]7c61c62
- Prism should read yml files too SO-200 (#299) (cbc96b2)
- prism-server should always return a response (e72c6bf)
- put oclif only where it is needed (68bf27d)
- remove explicit dependency (fd2885f)
- remove nvmrc (3eaee34)
- remove other packages and update (9eb9bfa)
- require the correct code (2e6d242)
- running
prism
cli threw exception (#190) (1893ccc) - schema faker fix (#195) (5889cc7)
- separate config concept sl-2191 (96e45fd)
- SL-2028 fixed absolute paths handling (#197) (8d668a1)
- SL-2030 disabled fastify's body serializing (#192) (7262c5f)
- SL-2192 stringify examples (#205) (bbf6492)
- SL-2377 host/forwarded headers support (#249) (f8a1131)
- SL-80 fixed router logic (7a3d35e)
- SL-80 fixed test (d1c8974)
- SL-80 more reasonable examples (68025c6)
- SL-82 created common args/flags place for cli (9f53eef)
- SO-80 added integration test (b1936e1)
- SO-80 added missing file (ff94b7b)
- SO-80 default to empty body, match even if no servers (c92e487)
- SO-80 fixed example (b7afa9b)
- SO-80 path fix (04cba58)
- SO-80 updated test name (d67d04a)
- SO-82 fixed tests (545294a)
- sync stuff should be sync (b4b3e8b)
- try to generate an example only if the schema is provided (b9b3310)
- try to publish first, and then publish binaries (#318) (1d8618c)
- upgrade graphite (#308) (4b6458a)
- use rootDirs and outDir to help oclif config find source commands (964b043)
- mocker: a bug where Content-Type was set but we didn't find it (b5a9dd8)
- validator: a bug where fastify omits hasOwnProperty in query obj (726fcff)
- validator: a bug where json object failed to parse (fbdab3c)
- --dynamic flag for CLI SO-217 (#301) (f1f27cf)
- Add binary script SO-162 (#271) (3b6b508)
- add changelog when releasing (#317) (df4aa95)
- add install script (#286) (766297d)
- add npm token to file to publish (0410836)
- add oas3 plugin (58ebc4c)
- CLI show endpoints and status SO-201 (#296) (d60830b)
- Implement header mocking functionality SO-227 (#314) (5f0c0ba)
- http-forwarder: add support for timeout and cancelToken (#309) (8e1db46)
- add some unit tests (46ac012)
- add tests and modify error response message (73db545)
- do not build (0a4a814)
- GitHub Releases and binary uploads (#279) (388df6d)
- integrate Prism with Graph (WIP) (f4d8b1e)
- release (#294) (a09dfb3)
- release manually (ab2f06e)
- release prism 3.x alpha with required scripts (6864986)
- revisit the build process (d7d307f)
- SL-2035 cli url spec (#200) (76ae24f)
- SL-2037 forbidding dirs to be supplied to --spec cli's arg (#198) (05c4b3c)
- SL-82 split mock and server commands (4ba0c28)
- SL-82 split mock and server commands (ddf87bd)
- SO-141 Problem+Json for error messages SO-141 (#270) (a5a3a67)
- support OAS json schema formats (7c3c4f5)
- throw exception when path is matched but method is not allowed. (de32fb0)
- upgrade ts (2bc6638)
- cli: add validation support and resource resolution (14b4b7d)
- config: add functional tests to meet AC (32f486b)
- core: implement a graph resource loader (431789e)
- httpConfig: add default config support and unit test (4f0a062)
- mocker: fix tests (27b74a3)
- mocker: fixed test (08c4d7f)
- mocker: integrate mocker with business logic (e4513c5)
- mocker: remove httpRequest from method signature (5163835)
- mocker: take http request into account (85f1bc0)
- negotiator: add remaining negotiator tests (944531f)
- negotiator: add unit tests for helpers (45603e9)
- negotiator: WIP tests (3776042)
- router: add matchPath function (7292957)
- router: add two more corner case tests for clarification (23dc242)
- router: implemented and unit tested router (07a31a1)
- router: lint and autofix all style issues (9eb501c)
- router: made baseUrl optional to ignore server matching (91669a8)
- router: make disambiguateMatches() private (91c2a7b)
- router: throw exceptions instead return null (ebb6d2c)
- router: WIP add disambiguation and server matching (c778ae6)
- router: WIP dummy router implementation and specs (2dc3f8b)
- sampler: add basic class structure and basic implementation (2c31635)