packages/pre-post-request-scripts/README.md
Post-response scripts for your OpenAPI documents.
Scripts are executed with the official Postman sandbox runtime (postman-sandbox), so the pm API behavior follows Postman semantics.
Note: This is intended to be used as a plugin with @scalar/api-client.
npm install @scalar/pre-post-request-scripts
import { createApiClientWeb } from '@scalar/api-client/layouts/Web'
import { postResponseScriptsPlugin } from '@scalar/pre-post-request-scripts'
import '@scalar/api-client/style.css'
createApiClientWeb(
document.getElementById('app'),
{
proxyUrl: 'https://proxy.scalar.com',
// Load the plugin
plugins: [
postResponseScriptsPlugin()
],
},
)
test scripts, so pm.response, pm.test, and pm.expect are provided by PostmanWe are API nerds. You too? Let's chat on Discord: https://discord.gg/scalar
The source code in this repository is licensed under MIT.