oaie-sketch icon indicating copy to clipboard operation
oaie-sketch copied to clipboard

VueJs compile error

Open designermonkey opened this issue 4 years ago • 4 comments


<div id="app" :class="{ editorWide: editorWide }">
		<div id="specEditor" v-if="!settings">
			<div v-for="(settingsKey, settingsName) in allSettings" class="settings" @click="selectSettings(settingsKey)">{{Â&nbsp;settingsName }}</div>
			<div class="settings new" @click="newSettings()">+ Create a new spec</div>
		</div>
		<div id="specEditor" v-if="settings">
			<div class="editor">
				<div class="measureHelper">Text</div>
				<textarea wrap="off" v-model="settings.spec" @change="save(); editorChanged = true;" spellcheck="false"></textarea>
			</div>
			<span class="editorWideToggle" @click="editorWide = !editorWide">{{Â&nbsp;editorWide ? '⧀' : '⧁' }}</span>
		</div>
		<div id="outputViewer" v-if="settings">
			<div class="menu">
				<button @click="load" :class="{ changed: editorChanged }">→ update from editor</button>
				<button @click="updateInlineViz" :class="{ changed: positionsChanged }">← update inline
					viz</button>
				<!--<button @click='dump'>&equiv; dump to console</button>-->
				<button @click="addSchema">⊕ schema</button>
				<div v-if="spec &amp;&amp; spec.info" class="title">{{ spec.info.title }} <span class="version">{{ spec.info.version }}</span></div>
			</div>
			<div id="output">
				<a v-for="(connection, c) in connections" v-bind:class="[&quot;arrow&quot;, connection.type]" v-bind:source="connection.source" v-bind:target="connection.target" v-bind:id="&quot;connection&quot; + c"></a>
				<div v-bind:class="[&quot;operation&quot;, operation._method]" v-bind:id="operation._key" v-bind:oaie-key="operation._key" v-bind:style="{ left: getPositionLeft(operation._key), top: getPositionTop(operation._key) }" v-for="operation in operations" v-draggable="">
					<div class="path">
						<b>{{Â&nbsp;operation._method }}</b>
						<span @click="selectPath(&quot;paths:/&quot; + encodeURIComponent(operation._path) + &quot;:/&quot; + operation._method + &quot;:&quot;)">{{ operation._path }}</span>
					</div>
					<div class="buttonRow">
						<button class="mini" @click="moveAllY(operation, -50)">↑</button>
						<button class="mini" @click="moveAllY(operation, 50)">↓</button>
					</div>
					<div class="summary"><b>{{ operation.operationId }}</b> {{ operation.summary }}</div>
					<ul>
						<li v-for="parameter in operation.parameters" v-bind:class="{ required: parameter.required }">
							<button>-</button>
							<span @click="selectPath(&quot;paths:/&quot; + encodeURIComponent(operation._path) + &quot;:/&quot; + operation._method + &quot;:/parameters:/- name: &quot; + parameter.name, parameter.name)">
								{{Â&nbsp;parameter.name }} ({{Â&nbsp;parameter.schema.type }})
							</span>
						</li>
						<li><button>+</button></li>
					</ul>
				</div>
				<div class="schema" v-if="spec &amp;&amp; spec.components" v-for="(schema, schemaName) in spec.components.schemas" v-bind:id="&quot;schema.&quot; + schemaName" v-bind:oaie-key="&quot;schema.&quot; + schemaName" v-bind:style="{ left: getPositionLeft(&quot;schema.&quot; + schemaName), top: getPositionTop(&quot;schema.&quot; + schemaName) }" v-draggable="">
					<h1 @click="selectPath(&quot;components:/schemas:/&quot; + schemaName + &quot;:&quot;)">{{ schemaName }}</h1>
					<div class="description">{{ schema.description }}</div>
					<ul>
						<li v-for="(property, propertyName) in schema.properties">
							<button>-</button>
							<span @click="selectPath(&quot;components:/schemas:/&quot; + schemaName + &quot;:/properties:/&quot; + propertyName + &quot;:&quot;)">
								{{Â&nbsp;propertyName }}
								({{Â&nbsp;property.type ? property.type : property.$ref ? property.$ref.replace('#/components/schemas/', '→') : '' }})
						</span></li>
						
						<li><button @click="addSchemaProperty(schema, schemaName)">+</button></li>
					</ul>
				</div>
			</div>
		</div>
	</div>

- invalid expression: missing ) after argument list in

    _s( settingsName)

  Raw expression: {{ settingsName }}

- invalid expression: missing ) after argument list in

    _s( editorWide ? '⧀' : '⧁')

  Raw expression: {{ editorWide ? '⧀' : '⧁' }}

- invalid expression: missing ) after argument list in

    _s( operation._method)

  Raw expression: {{ operation._method }}

- invalid expression: missing ) after argument list in

    "\n\t\t\t\t\t\t\t\t"+_s( parameter.name)+" ("+_s( parameter.schema.type)+")\n\t\t\t\t\t\t\t"

  Raw expression: {{ parameter.name }} ({{ parameter.schema.type }})

- invalid expression: missing ) after argument list in

    "\n\t\t\t\t\t\t\t\t"+_s( propertyName)+"\n\t\t\t\t\t\t\t\t("+_s( property.type ? property.type : property.$ref ? property.$ref.replace('#/components/schemas/', '→') : '')+")\n\t\t\t\t\t\t"

  Raw expression: {{ propertyName }}
								({{ property.type ? property.type : property.$ref ? property.$ref.replace('#/components/schemas/', '→') : '' }})



(found in <Root>)

This happens when I load the page. Using tag 0.2.1

designermonkey avatar Dec 05 '20 23:12 designermonkey

@designermonkey, which browser are you on (i am on chrome)? does https://rawcdn.githack.com/OAIE/oaie-sketch/87075ce5890a475a9787da126ed134f6a5d681c7/sketch.html work for you?

ZPiDER666 avatar Dec 07 '20 15:12 ZPiDER666

I'm Chrome too. Yes the demo url works fine, just not when I clone the repo locally. I've tried master, 0.2.1 and 0.2, all failing.

designermonkey avatar Dec 07 '20 17:12 designermonkey

I am running it inside docker nginx, if that's any help?

Edit:

It runs outside of the container. Now I'm confused as to how it's failing when it's served by nginx.

designermonkey avatar Dec 07 '20 17:12 designermonkey

can you check if any errors come up in the network tab? there are some includes, if those fail, there may be any number of issues

ZPiDER666 avatar Dec 09 '20 09:12 ZPiDER666