mod_rest/apidemo.lib.lua
changeset 4532 fd15e7f00ff5
parent 4502 1776831d0fab
child 4554 0befc680970b
equal deleted inserted replaced
4531:9a6aaba3d5ef 4532:fd15e7f00ff5
    18 	-- SUCH HACK, VERY GSUB, WOW!
    18 	-- SUCH HACK, VERY GSUB, WOW!
    19 	index = index:gsub("(%s?url%s*:%s*)%b\"\"", string.format("%%1%q", module:http_url().."/demo/openapi.yaml"), 1);
    19 	index = index:gsub("(%s?url%s*:%s*)%b\"\"", string.format("%%1%q", module:http_url().."/demo/openapi.yaml"), 1);
    20 end
    20 end
    21 
    21 
    22 do
    22 do
    23 	local f = module:load_resource("openapi.yaml");
    23 	local f = module:load_resource("res/openapi.yaml");
    24 	_M.schema = {
    24 	_M.schema = {
    25 		headers = {
    25 		headers = {
    26 			content_type = "text/x-yaml";
    26 			content_type = "text/x-yaml";
    27 		};
    27 		};
    28 		body = f:read("*a");
    28 		body = f:read("*a");