Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ECMA 262 regex“^/&引用;与输入字符串“不匹配”;https://domain.herokuapp.com"_Heroku_Playframework_Swagger_Swagger Ui_Playframework 2.4 - Fatal编程技术网

ECMA 262 regex“^/&引用;与输入字符串“不匹配”;https://domain.herokuapp.com"

ECMA 262 regex“^/&引用;与输入字符串“不匹配”;https://domain.herokuapp.com",heroku,playframework,swagger,swagger-ui,playframework-2.4,Heroku,Playframework,Swagger,Swagger Ui,Playframework 2.4,我已经将基于Play2.4API的项目部署到heroku。在生产中,api出现在/swagger上,但它也显示了一些错误。在浏览错误时,它显示json { schemaValidationMessages: [{ level: "error", domain: "validation", keyword: "pattern", message: "ECMA 262 regex "^/" does not match inpu

我已经将基于Play2.4API的项目部署到heroku。在生产中,api出现在
/swagger
上,但它也显示了一些错误。在浏览错误时,它显示json

{
    schemaValidationMessages: [{
        level: "error",
        domain: "validation",
        keyword: "pattern",
        message: "ECMA 262 regex "^/" does not match input string "https://domain.herokuapp.com "",
        schema: {
            loadingURI: "#",
            pointer: "/properties/basePath"
        },
        instance: {
            pointer: "/basePath"
        }
    }]
}
我添加的依赖项是

  "io.swagger" %% "swagger-play2" % "1.5.2"
从play prod配置中,我的procfile中有swagger basepath

-Dswagger.api.basepath=https://domain.herokuapp.com
错误的原因可能是什么?如何删除它


谢谢

我想这是主机,基本路径应该是“/”。至少这帮我解决了这个问题

  "host" : "https://domain.herokuapp.com",
  "basePath" : "/",

“域”是你的Heroku应用程序的名称,还是你刚刚用“域”替换了你的应用程序名称?是的,我用我的Heroku应用程序名称替换了域