ECMA 262 regex“^/&引用;与输入字符串“不匹配”;https://domain.herokuapp.com"
我已经将基于Play2.4API的项目部署到heroku。在生产中,api出现在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
/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应用程序名称替换了域