Referencing operation from an external file seems to interfere with local resolution of definitions.
I updated to the latest from the master branch and still see the same behaviour.
I have a swagger file:
that defines a Base and Composite resource definition. When I load it up in Swagger UI, it displays fine and the composite resource Example Value shows all the properties from both definitions.

However, when I add a new operation that references an external resource:
"/imported": {
"$ref": "https://raw.githubusercontent.com/Voyent/swagger-ui/master/src/main/html/services/ops-swagger.json#/import"
}
The Example Value now showing for the composite parameter is incorrect. It seems like it's not resolving the local definitions properly.

Note:
- I don't see any errors in the browser console.
- Both files appear to get loaded properly.
- I do not see the same issue in the Swagger Editor.
- It doesn't matter if the reference is relative or absolute.
- It works if I remove the reference or inline the information from the external file.
Just to follow up, I was playing around with other externally referenced files, for example this default response:
"default": {
"description": "An error occurred.",
"schema": {
"$ref": "definitions.json#/Error"
}
}
It appears that any externally referenced file interferes with the Example Value when it relies on an internal reference for composition. I'm really hoping to avoid copying and pasting all the external information into the specific API files.
Could you please open an issue in swagger-js for this?
No problem: https://github.com/swagger-api/swagger-js/issues/811