-
Notifications
You must be signed in to change notification settings - Fork 9k
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
swagger-ui-bundle.js:58880 Could not find component #2931
Comments
Are you running from the project directory or have you brought swagger-ui-bundle.js into your own project? If so, can you please share how you did it? |
I'm running out of the dist directory.
|
eh, that's not the project directory. I have a feeling you're missing some files in there. |
Any suggestions on resolving this? I cloned the project to this directory. What files do you think I might be missing? |
These warnings are nothing to be worried about 😄 In the json schema rendering code, we optimistically query our system for a number of components. If the component doesn't exist, those warnings get thrown. As long as you're not seeing render errors accompanying those warnings, you should be good to go. @fehguy, if we want to silence these errors, we can modify this code to query for the component before attempting to get a reference to the component. |
Thank you! |
If it really is nothing to be worried about, it would probably be best to silence the warning. People will worry about it and google the warning and find this issue and add a comment here... Like I'm doing right now. 😄 |
Does it actually use all those 64 bits? It is important to understand that Javascript does not have Integer and Float. Instead, it only has Number, which is a 64-bit floating point format. The integer numbers are encoded as 64 bit floats. This means you can only safely store int's that fit in 53 bits. Check out Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER... Only ints that fall in this range are 'safe' to be encoded using Number. If you need support for larger numbers, the way to do that is by using a custom library, such as big-number. It is a very similar situation to say using 128 bit numbers in Java... It can't be done natively, you need a support library. In JS this happens for integers bigger than 53 bits or floats bigger than 64 bits. A simple solution might be to encode the ID as a string. EDIT: Should have looked at your screenshot better. The number shown is too big to fit in a JS Number. Either safe it as a string, or use some big number library. |
Thanks, Download, for your explanation! |
Swagger-ui loads without issue, however when attempting to use the 'Try it out' feature I'm noticing several warnings within the swagger-ui-bundle.js. Is this known/expected behavior?
The general errors are:
swagger-ui-bundle.js:58880 Could not find component JsonSchema_string_
swagger-ui-bundle.js:58880 Could not find component JsonSchema_integer_
swagger-ui-bundle.js:58880 Could not find component JsonSchema_integer
swagger-ui-bundle.js:58880 Could not find component JsonSchema_string_boolean
swagger-ui-bundle.js:58880 Could not find component JsonSchema_string_full-date
The text was updated successfully, but these errors were encountered: