API Reference
Primary functionality
These exported entities can be accessed directly from the main papupata library.
APIDeclaration
This class is the where almost everything happens, it is used for declaring, implementing and calling APIs.
Methods on the API declaration can be used to create PartiallyDeclaredAPIs, which in turn become DeclaredAPIs
convertExpressMiddleware
This function converts express middleware to papupata middleware.
skipHandlingRoute
This special value allows for having express continue routing.
handleUndefinedResponsesMiddleware
This middleware changes how undefined API responses values are handled.
Secondary functionality
These exported entities are considered support functionality can be imported from their own files.
fetchAdapter
This adapter allows you to call the APIs using global fetch as the means for doing so.
requestPromiseAdapter
This adapter allows you to call the APIs using global request promsie as the means for doing so.
supertestAdapter
This adapter allows you to call the APIs using supertest
supertestAdapter
This adapter allows you to call the APIs using supertest
supertestInvoker
This adapter allows you to call the APIs using supertest while giving you access to the supertest request for making assertions.
invokeImplementationAdapter
This adapter allows you to call the APIs without actually running an express server, primarily in tests.
testInvoker
This function allows you to call the APIs without actually running an express server, primarily in tests.