Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kickstarter: Adding Authorization Server with "auth-server" in name break the API! dialog #77

Closed
thomsch98 opened this issue Jul 6, 2017 · 2 comments

Comments

@thomsch98
Copy link
Collaborator

To reproduce:

  • setup your "usual" protal configuration
  • add an api with oauth2 for authentication
  • add a new authorization server named "a-auth-server"
  • save auth server
  • open API dialog

Output (on screen):

/usr/src/app/views/layout.jade:125 123| mixin checkBox(source, thisIsNotUsedButApparentlyJadeNeedsItSomebodyCanExplainPlease, label, desc) 124| - var inputId = source > 125| - var inputValue = eval(source) 126| .checkbox 127| label 128| if inputValue server is not defined

ReferenceError: /usr/src/app/views/layout.jade:125
    123| mixin checkBox(source, thisIsNotUsedButApparentlyJadeNeedsItSomebodyCanExplainPlease, label, desc)
    124|   - var inputId = source
  > 125|   - var inputValue = eval(source)
    126|   .checkbox
    127|     label
    128|       if inputValue

server is not defined
    at eval (eval at jade_interp (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8)), <anonymous>:1:28)
    at Object.jade_interp [as checkBox] (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8), <anonymous>:1281:18)
    at Object.eval (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8), <anonymous>:302:24)
    at Object.jade_interp [as renderApi] (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8), <anonymous>:320:4)
    at eval (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8), <anonymous>:2077:25)
    at eval (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8), <anonymous>:2095:4)
    at eval (eval at <anonymous> (/usr/src/app/node_modules/jade/lib/index.js:218:8), <anonymous>:2306:22)
    at res (/usr/src/app/node_modules/jade/lib/index.js:219:38)
    at Object.exports.renderFile (/usr/src/app/node_modules/jade/lib/index.js:380:38)
    at Object.exports.renderFile (/usr/src/app/node_modules/jade/lib/index.js:370:21)
@DonMartin76
Copy link
Member

OK, so embarrassing enough, this has nothing to do with the term a-auth-server, and everything with the fact that it contains two hyphens, and the guard which replaces - with _ was not implemented as .replace(/\-/g, '_') but as .replace('-', '_')...

@DonMartin76 DonMartin76 added this to the 0.11.7 milestone Jul 18, 2017
DonMartin76 added a commit to apim-haufe-io/wicked.kickstarter that referenced this issue Jul 18, 2017
…replaced globally - crashes with more than one
@DonMartin76
Copy link
Member

Fixed in 0.11.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants