Skip to content

Instantly share code, notes, and snippets.

@ntotten
Last active March 7, 2024 14:46
Show Gist options
  • Save ntotten/deb9fd9f82a786e24b72d03a0abc320d to your computer and use it in GitHub Desktop.
Save ntotten/deb9fd9f82a786e24b72d03a0abc320d to your computer and use it in GitHub Desktop.
{
"name": "my-request-validation-inbound-policy",
"policyType": "request-validation-inbound",
"handler": {
"export": "RequestValidationInboundPolicy",
"module": "$import(@zuplo/runtime)",
"options": {
"includeRequestInLogs": false,
"logLevel": "info",
"validateBody": "reject-and-log"
}
}
}
{
"openapi": "3.1.0",
"info": {
"version": "1.0.0",
"title": "My Zuplo API"
},
"paths": {
"/for": {
"x-zuplo-path": {
"pathMode": "url-pattern"
},
"get": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "../schemas/example.json"
}
}
}
},
"summary": "New Route",
"description": "Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do `eiusmod tempor` incididunt ut labore et dolore magna aliqua.",
"x-zuplo-route": {
"corsPolicy": "none",
"handler": {
"export": "urlForwardHandler",
"module": "$import(@zuplo/runtime)",
"options": {
"baseUrl": "https://echo.zuplo.io"
}
},
"policies": {
"inbound": []
}
},
"operationId": "0714d513-3f75-463e-8048-5999b4532826"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment