swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.54k stars 8.96k forks source link

Handling Operation Paths with underscores #201

Closed specialjyo closed 10 years ago

specialjyo commented 11 years ago

When an operation path has an underscore, the ui replaces the underscore with a space, so the id of the li to click on , and it's content have basically two ids like this:

id=system_deleteApp%20Group_delete_14_content

To get around this and make the UI work, I changed form the basic ID selector "#" to this:

$('[id='+dom_id+']')  //changed in other places using the # selector as well.

Still seeing the error below when i expand an operation , and then refresh the page though:

Error: Syntax error, unrecognized expression: [id=system_deleteApp%20Group_delete_14_content] https://dsp-stack.cloud.dreamfactory.com/app/swagger/lib/jquery-1.8.0.min.js Line 2

You can see it working here: https://dsp-stack.cloud.dreamfactory.com/

fehguy commented 10 years ago

please reopen if still an issue