Go-Swagger: Failed to load API definition 405

182 Views Asked by At

I'm trying to generate a swagger docs in golang with go-swagger mod. Basically i'm generating the specs by source

swagger generate spec -o ./gen/swagger-local.yaml --scan-models

On localhost it's ok, the docs was generated and I can visualize on browser (localhost).

However, in production, I received an error 405 (invalid):

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file {{myURL/swagger.yaml}}"}]}

Searching more about it, I found this thread ==> Github

Apparently, it's because I need to disable the validate() or configure it, but I didn't find any more information. Any help?

0

There are 0 best solutions below