webroot.openapi-viewer.js.app-legacy.08fa9260.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartvillage-platform Show documentation
Show all versions of smartvillage-platform Show documentation
Red Hat Global Social Innovation Program is partnering with Boston University and Smarta Byar in order to collaborate on creating a global and open research platform allowing researchers to study what social sustainability means by using a digital twin of Veberöd, Sweden as the test village, supported by Smarta Byar. The goal of this collaboration is to build the open source technological infrastructure so that researchers can collaborate on this platform effectively to study mobility, public health, sustainability among other study areas to ultimately help define better the link between well being and eco-smart cities.
(function(e){function t(t){for(var a,r,o=t[0],c=t[1],l=t[2],u=0,p=[];u100){var f=-1;f=m.indexOf("\n"),(-1===f||f>100)&&(f=m.indexOf(". ")),(-1===f||f>100)&&(f=m.indexOf(".")),d=-1===f||f>100?m:m.substr(0,f)}else d=m;var h=[];h=s?u.parameters?s.filter(function(e){if(!u.parameters.some(function(t){return e.name===t.name&&e.in===t.in}))return e}).concat(u.parameters):s.slice(0):u.parameters?u.parameters.slice(0):[],o.paths.push({show:!0,expanded:!1,expandedAtLeastOnce:!1,summary:d,method:n,description:u.description,path:e,operationId:u.operationId,requestBody:u.requestBody,parameters:h,servers:u.servers?i.servers.concat(u.servers):i.servers,responses:u.responses,depricated:u.deprecated,security:u.security,commonSummary:i.summary,commonDescription:i.description}),r++}})};for(var i in t.paths)s(i);var o={},c=[];o=t.components?t.components.securitySchemes:{},t.servers&&t.servers.map(function(t){if(t.url&&"/"===t.url.substr(0,1)){var n=e.split("/");t.url=n[0]+"//"+n[2]+t.url}}),c=t.servers;var l={info:t.info,tags:a,externalDocs:t.externalDocs,securitySchemes:o,servers:c,basePath:t.basePath,totalPathCount:r};return F.a.resolve(l)}).catch(function(e){console.error(e)})}var ee={data:function(){return{specUrl:"",searchVal:"",parsedSpec:{},isDevMode:!1,selectedApiServer:"",isSpecLoaded:!1,expandAll:!1,loading:!1,authStatus:"",docDescription:"",showSettingsPanel:!1,showLoadJsonPanel:!1,jsonSpecText:"",prevScrollpos:0}},methods:{loadJson:function(){var e=this;try{var t=JSON.parse(this.jsonSpecText);e.loading=!0,Z(t).then(function(t){e.loading=!1,e.specUrl="/static/openapi3-enUS.yml",e.showLoadJsonPanel=!1,e.afterSpecParsedAndValidated(t)}).catch(function(t){return e.loading=!1,e.$message({showClose:!0,message:"Oops, Error encountered while parsing the Spec",type:"error"}),console.error("Onoes! The API is invalid. "+t.message),!1})}catch(n){e.$message({showClose:!0,message:"Unable to parse the JSON Text",type:"error"})}},loadSpec:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this;t.loading=!0,t.$nextTick(function(){Z(t.specUrl).then(function(n){t.loading=!1,t.jsonSpecText="",void 0!==n&&null!==n?t.afterSpecParsedAndValidated(n,e):t.$message({showClose:!0,message:"Network Error encountered while fetching the Spec",type:"error"})}).catch(function(e){return t.loading=!1,t.$message({showClose:!0,message:"Oops, Error encountered while parsing the Spec",type:"error"}),console.error("Onoes! The API is invalid. "+e.message),!1})})},onSearchKeyUp:Object(H["a"])(function(e){var t=this;this.parsedSpec.tags.map(function(e){for(var n=0,a=0;a0})},500),afterSpecParsedAndValidated:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this,a="";n.searchVal="",n.parsedSpec=e,e.info.description&&(n.docDescription=k()(e.info.description)),(e.servers&&0==e.servers.length||!e.servers)&&(a=n.specUrl.substring(0,n.specUrl.indexOf("/",n.specUrl.indexOf("//")+2)),e.basePath&&(a=a+"/"+e.basePath.replace(/^\/|\/$/g,"")),n.parsedSpec.servers=[{url:a,description:"Auto generated Server URI"}]),n.isSpecLoaded=!0,n.isDevMode=!0,n.selectedApiServer=e.servers[0].url,z["a"].commit("specUrl",n.specUrl),z["a"].commit("selectedApiServer",e.servers[0].url),z["a"].commit("oAuthTokenUrl",""),!1===t&&(z["a"].commit("isDevMode",!0),z["a"].commit("reqToken",""),z["a"].commit("reqTokenType",""),z["a"].commit("reqSendTokenIn",""),z["a"].commit("reqHeader",""))},onExpandAll:function(e){void 0!==this.parsedSpec.tags&&this.parsedSpec.tags.map(function(t){t.paths.map(function(t){t.expanded=e,t.expandedAtLeastOnce=!0})})},onActivateSecurityScheme:function(e){console.log("%o",e)},handleScroll:function(){var e=this,t=e.$refs.pageContainer.scrollTop;e.prevScrollpos>t?(e.$refs.appHeader.style.top="0",e.$refs.pageContainer.style.marginTop="70px"):(e.$refs.appHeader.style.top="-75px",e.$refs.pageContainer.style.marginTop="0px"),e.prevScrollpos=t}},beforeRouteUpdate:function(e,t,n){e.path.startsWith("/load")&&e.params.specUrl&&(this.authStatus="(Not Authenticated)",this.specUrl=e.params.specUrl,this.loadSpec(!1)),n()},mounted:function(){console.log("Adding Listener"),this.$refs.pageContainer.addEventListener("scroll",this.handleScroll),"/reload"===this.$route.fullPath?(this.specUrl=z["a"].state.specUrl,z["a"].commit("reqToken",localStorage.getItem("accessToken")),z["a"].commit("reqTokenType",localStorage.getItem("tokenType")),this.specUrl&&(this.authStatus="(OAuth Applied)",this.loadSpec(!0))):this.$route.fullPath.startsWith("/load")&&this.$route.params.specUrl?(this.authStatus="(Not Authenticated)",this.specUrl=this.$route.params.specUrl,this.loadSpec(!1)):this.authStatus="(Not Authenticated)"},created:function(){},destroyed:function(){document.removeEventListener("scroll",this.handleScroll)},components:{EndPoint:P,MrinLogo:j,SecuritySchemes:W,VueSideoutPanel:M.a}},te=ee,ne=(n("16c7"),Object(C["a"])(te,w,S,!1,null,"127d0e41",null)),ae=ne.exports;g["default"].use(y["a"]);var re=new y["a"]({routes:[{path:"/",redirect:function(e){return"load"}},{path:"/load/:specUrl?",name:"load",component:ae},{path:"/reload",name:"reload",component:ae}]});re.beforeEach(function(e,t,n){if(e.path.startsWith("/load")&&!e.params.specUrl){var a="";a="/static/openapi3-enUS.yml",re.push("/load/".concat(encodeURIComponent(a)))}n()});var se=re,ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},oe=[],ce=(n("5c0b"),{}),le=Object(C["a"])(ce,ie,oe,!1,null,null,null),ue=le.exports,pe=n("4897"),de=n.n(pe),me=n("b2d6"),fe=n.n(me);g["default"].config.productionTip=!1,de.a.use(fe.a),g["default"].use(v.a),g["default"].use(f.a),g["default"].use(d.a),g["default"].use(u.a),g["default"].use(c.a),g["default"].use(i.a.directive),g["default"].prototype.$message=r.a,g["default"].prototype.$loading=i.a.service,g["default"].prototype.$marked=k.a;new g["default"]({router:se,store:z["a"],render:function(e){return e(ue)}}).$mount("#app")},"5c0b":function(e,t,n){"use strict";var a=n("5e27"),r=n.n(a);r.a},"5e27":function(e,t,n){},6345:function(e,t,n){},"707e":function(e,t,n){},"81cf":function(e,t,n){"use strict";var a=n("cc11"),r=n.n(a);r.a},b279:function(e,t,n){"use strict";n.d(t,"a",function(){return d}),n.d(t,"f",function(){return f}),n.d(t,"b",function(){return h}),n.d(t,"d",function(){return m}),n.d(t,"c",function(){return y}),n.d(t,"e",function(){return w});var a=n("7618"),r=n("a098"),s=n.n(r),i=(n("28a5"),n("a4bb")),o=n.n(i),c=n("f499"),l=n.n(c),u=n("5176"),p=n.n(u);function d(e,t){var n=null;return function(){clearTimeout(n);var a=arguments,r=this;n=setTimeout(function(){e.apply(r,a)},t)}}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a="";if("circular"===e.type)return"circular-ref";if(e.enum){var r="";e.enum.map(function(e){r=r+e+", "}),a="enum:〔 ".concat(r.slice(0,-2)," 〕")}else e.type&&(a+=e.type);"integer"!==e.type&&"number"!==e.type||(void 0!==e.minimum&&void 0!==e.maximum?a="".concat(a," (").concat(e.exclusiveMinimum?">":"").concat(e.minimum," ⋯ ").concat(e.exclusiveMaximum?"<":""," ").concat(e.maximum,")"):void 0!==e.minimum&&void 0===e.maximum?a="".concat(a," (").concat(e.exclusiveMinimum?">":"≥").concat(e.minimum,")"):void 0===e.minimum&&void 0!==e.maximum&&(a="(".concat(e.exclusiveMaximum?"<":"≤").concat(e.maximum,")")),void 0!==e.multipleOf&&(a="(multiple of ".concat(e.multipleOf,")"))),"string"===e.type&&(void 0!==e.minLength&&void 0!==e.maxLength?a="".concat(a," (").concat(e.minLength," to ").concat(e.maxLength," chars)"):void 0!==e.minLength&&void 0===e.maxLength?a="".concat(a," (min:").concat(e.minLength,")"):void 0===e.minLength&&void 0!==e.maxLength&&(a="".concat(a," (max:").concat(e.maxLength,")"))),t?(t.readOnly&&(a="".concat(a," Ⓡ")),t.writeOnly&&(a="".concat(a," Ⓦ")),t.deprecated&&(a="".concat(a," ❌"))):(e.readOnly&&(a="".concat(a," Ⓡ")),e.writeOnly&&(a="".concat(a," Ⓦ")),e.deprecated&&(a="".concat(a," ❌")));var s=n?"":"
";return e.format&&(a+=" ".concat(s," (").concat(e.format,")")),e.pattern&&!e.enum&&(a+=" ".concat(s,"(").concat(e.pattern,")")),a}function f(e,t){if(null!=e){if("object"===e.type||e.properties)for(var n in e.properties)t[n]=f(e.properties[n],{});else if("array"===e.type||e.items)t=[f(e.items,{})];else{if(!e.allOf)return"".concat(m(e),"~|~").concat(e.description?e.description:"");if(1===e.allOf.length){if(e.allOf[0]){var a={readOnly:e.readOnly,writeOnly:e.writeOnly,depricated:e.deprecated};return"".concat(m(e.allOf[0],a),"~|~").concat(e.description?e.description:"")}return"string~|~".concat(e.description?e.description:"")}var r={};e.allOf.map(function(e){if(e&&e.properties){var t=f(e,{});p()(r,t)}}),t=r}return t}}function h(e,t,n,a,r){var s=[];if(e)for(var i in e){s.push({exampleType:"json",exampleValue:"text"===r?l()(e[i].value,void 0,2):e[i].value})}else t&&s.push({exampleType:"json",exampleValue:"text"===r?l()(t,void 0,2):t});if(0==s.length)if(n){var o=v(n,{},{includeReadOnly:!0,includeWriteOnly:!0,deprecated:!0});s.push({exampleType:"json",exampleValue:"text"===r?l()(o,void 0,2):o})}else s.push({exampleType:"text",exampleValue:""});return s}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e){if("object"===e.type||e.properties)for(var a in e.properties)e.properties[a].deprecated||e.properties[a].readOnly&&!n.includeReadOnly||e.properties[a].writeOnly&&!n.includeWriteOnly||(t[a]=v(e.properties[a],{},n));else if("array"===e.type||e.items)t=[v(e.items,{},n)];else{if(!e.allOf)return g(e);if(1===e.allOf.length)return e.allOf[0]?g(e.allOf[0]):"string";var r={};e.allOf.map(function(e){if(e&&e.type){var t=v(e,{},n);p()(r,t)}}),t=r}return t}}function g(e){if(e.example)return e.example;if(0===o()(e).length)return null;var t=e.format||e.type||(e.enum?"enum":null);switch(t){case"int32":case"int64":case"integer":return 0;case"float":case"double":case"number":return.5;case"string":return e.enum?e.enum[0]:e.pattern?e.pattern:"string";case"byte":return btoa("string");case"binary":return"binary";case"boolean":return!1;case"date":return new Date(0).toISOString().split("T")[0];case"date-time":return new Date(0).toISOString();case"dateTime":return new Date(0).toISOString();case"password":return"password";case"enum":return e.enum[0];case"uri":return"http://example.com";case"uuid":return"3fa85f64-5717-4562-b3fc-2c963f66afa6";case"email":return"[email protected]";case"hostname":return"example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"circular":return"CIRCULAR REF";default:return e.nullable?null:(console.warn("Unknown schema value",e),"?")}}function y(e){var t=e.split("/");return t[0]+"//"+t[2]}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new s.a;return function(n,r){if("object"===Object(a["a"])(r)&&null!==r){if(t.has(r)){if(e>0)return{};var s=JSON.parse(l()(r,w(e+1)));return t.add(s),s}t.add(r)}return r}}},c0d6:function(e,t,n){"use strict";n("cadf"),n("551c"),n("f751"),n("097d");var a=n("2b0e"),r=n("2f62"),s=n("bfa9");a["default"].use(r["a"]);var i=["lang","specUrl","reqToken","reqTokenType","reqHeader","reqSendTokenIn","oAuthTokenUrl"];new s["a"]({key:"mrindoc",storage:window.localStorage,filter:function(e){return i.indexOf(e.type)>=0}});t["a"]=new r["a"].Store({state:{lang:"en",specUrl:"",isDevMode:!1,selectedApiServer:"",reqHeader:"",reqToken:"",reqTokenType:"",reqSendTokenIn:"",oAuthClientId:"",oAuthClientSecret:"",oAuthTokenUrl:""},mutations:{lang:function(e,t){e.lang=t},specUrl:function(e,t){e.specUrl=t},isDevMode:function(e,t){e.isDevMode=t},reqToken:function(e,t){e.reqToken=t},reqTokenType:function(e,t){e.reqTokenType=t},reqHeader:function(e,t){e.reqHeader=t},reqSendTokenIn:function(e,t){e.reqSendTokenIn=t},oAuthClientId:function(e,t){e.oAuthClientId=t},oAuthClientSecret:function(e,t){e.oAuthClientSecret=t},oAuthTokenUrl:function(e,t){e.oAuthTokenUrl=t},selectedApiServer:function(e,t){e.selectedApiServer=t}},plugins:[(new s["a"]).plugin]})},cc11:function(e,t,n){},f6b5:function(e,t,n){"use strict";var a=n("6345"),r=n.n(a);r.a}});
//# sourceMappingURL=app-legacy.08fa9260.js.map