Mercurial > prosody-modules
diff mod_rest/apidemo.lib.lua @ 5650:0eb2d5ea2428
merge
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Sat, 06 May 2023 19:40:23 -0500 |
parents | d03448560acf |
children |
line wrap: on
line diff
--- a/mod_rest/apidemo.lib.lua Wed Feb 22 22:47:45 2023 -0500 +++ b/mod_rest/apidemo.lib.lua Sat May 06 19:40:23 2023 -0500 @@ -27,11 +27,13 @@ do local f = module:load_resource("res/openapi.yaml"); + local openapi = f:read("*a"); + openapi = openapi:gsub("https://example%.com/oauth2", module:http_url("oauth2")); _M.schema = { headers = { content_type = "text/x-yaml"; }; - body = f:read("*a"); + body = openapi; } f:close(); end