Page MenuHomePhabricator

Sourcemap is incorrect in RESTBase help page
Closed, ResolvedPublic

Description

Steps to reproduce:

  • visit the RESTBase help screen, e.g. https://en.wikipedia.org/api/rest_v1/
  • cause an error by putting the wrong URL in the input field
  • explore the error stack trace in Chrome by clicking on the line numbers

The line numbers will be a few lines off. Either the build process that created the sourcemap is not run n every update, or something gets prepended to the final JS file, throwing off the numbers.

Event Timeline

Tgr created this task.Sep 5 2017, 3:42 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2017, 3:42 AM
mobrovac triaged this task as Low priority.Sep 5 2017, 9:52 AM
mobrovac added a subscriber: mobrovac.

cause an error by putting the wrong URL in the input field

Could you elaborate on this? Which input field are you referring to?

cause an error by putting the wrong URL in the input field

Could you elaborate on this? Which input field are you referring to?

My guess would be the spec URL at the top.

Tgr added a comment.Sep 10 2017, 7:34 AM

Yeah, the field that's initially set to https://en.wikipedia.org/api/rest_v1/?spec. You can e.g. delete the last character and click explore to trigger an error.

GWicke added a comment.EditedSep 11 2017, 3:40 PM

Looking at the three custom changes we did on top of upstream in https://github.com/wikimedia/swagger-ui/commits/master, it seems that the build process we ran after each did not update the source map. However, the gulpfile defines "dist" to be part of the default task (see https://github.com/wikimedia/swagger-ui/blob/master/gulpfile.js#L188). Perhaps we "just" forgot to check in the updated source maps? /cc @Pchelolo

mobrovac closed this task as Resolved.May 30 2019, 7:51 AM
mobrovac claimed this task.

We have switched to OpenAPI v3 (together with the accompanying swagger-ui library update), so this should not be an issue any more. Please reopen if that's not the case.