Make it easy to create OpenAPI specification documents in your tests using the builder pattern.
Creating a full OpenAPI spec document in automated tests is rather cumbersome, long JSON-like objects pollute the test test code and make it difficult for readers to distinguish between what's important in the test and what's just shared OpenAPI boilerplate.
npm install --save-dev @loopback/openapi-spec-builder
This package is typically used in tests, save it to
;.withOperationReturningString'get', '/hello', 'greet'.build;// which is equivalent to the following longer form.withOperation'get', '/hello',.build;// the spec;
npm test from the root folder.
See all contributors.