I‘ve uploaded a Swagger File into Portal Management documentation. While the Swagger file shows no error on „Swagger Hub“ , Tyk Portal Management shows an error at the bottom line:
{"messages":["malformed or unreadable swagger supplied"],"schemaValidationMessages":[{"level":"error","domain":"validation","keyword":"type","message":"instance type (string) does not match any allowed primitive type (allowed: [\"object\"])","schema":{"loadingURI":"#","pointer":""},"instance":{"pointer":""}}]}
Hi,
in the meantime I had converted the swagger file to version 3.0 and uploaded it into Portal Management. The upgraded swagger file causes no error. I don’t know if this information will help you in finding the reason for the error message.
This seems to be a bug specific to your particular docs, if you open a GH issue on the TykTechnologies/tyk repo you’ll be able to track the progress from there.
When uploading the docs you need to click on one of the tabs at the top (like “From Swagger File”) before you paste it into the box, otherwise you run into this bug.
Sounds promising, I’ve tested it just now. But this does not help me. I can also remember that I’ve always clicked at the tab Attach documentation before I’ve pasted the code.
Here is a video showing showing what I meant earlier, you need to click on the “From Swagger File” tab before pasting due to the bug I mentioned. https://www.screencast.com/t/TIEABD5x
It was a little bit difficult to find out the url that is combined from API URL + Key + /documentation
But following your instruction screencast, I get the following:
Sorry I should have been clearer, don’t worry about the URL he pasted in, this was just a mistake as he had the wrong thing in his clipboard.
The important thing to note is just that you have to explicitly click on the “From Swagger File” tab first, and then you can paste in the original swagger file that you sent in the first post on here and it should work
Here is the result using the code you sent in your first post:
Ok interesting, I’ve used the same code on Cloud and I’m not seeing any errors, so I’ve asked for input from the engineering team and I’ll get back to you once I hear from them again.
When you click on the red error link, what do you see? The same error text you quoted in your original post?