swagger Error

Not applicable

WHile importing swagger json in developer portal i get bad swagger error with following in log messges

{ "code" : "apimodel.BadSwaggerReceived", "message" : "This is not a valid Swagger. Unable to retrieve details from the swagger provided.", "contexts" : [ ], "cause" : { "message" : "Unexpected character ('�' (code 65533 / 0xfffd)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@71550379; line: 1, column: 2]", "contexts" : [ ] } }

However i am able to upload same swagger json in swagger UI . Can you please let me know how to resolve this in developer portal .

0 5 497
5 REPLIES 5

@Arpit Sharma , Can you please provide sample OpenAPI (Swagger) spec to reproduce above error if possible ?

Not applicable

I resolved the issue.

@Arpit Sharma

Glad to know you have resolved above query, Would you like to share what was the issue & how did you solve same so that it will be helpful for others too ?

Not applicable

I simply encoded the files with utf-8 encoding

Not applicable

I believe that edge server allows only utf-8 files unlike swaggerui