Open vpawar-tibco opened 1 year ago
As per swagger docs - https://swagger.io/docs/specification/api-host-and-base-path/
If the servers array is not provided or is empty, the server URL defaults to /
While parsing a swagger json with -
"servers": [ { "url": "/" } ],
and the java code to parse the swagger json -
OpenAPI swagger = new OpenAPIV3Parser().read(<path-to-swagger.json>); if(swagger == null) { System.out.println("Swagger is null"); }
The swagger object returns null. When the server url is set to http://localhost/ the same code snippet works fine.
http://localhost/
Swagger parser version - v3-2.1.12
As per swagger docs - https://swagger.io/docs/specification/api-host-and-base-path/
While parsing a swagger json with -
and the java code to parse the swagger json -
The swagger object returns null. When the server url is set to
http://localhost/
the same code snippet works fine.Swagger parser version - v3-2.1.12