question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load an OpenAPI3 spec from the classpath

See original GitHub issue

In my Vert.x 3.5.0 project, I am trying to use an OpenAPI3 specification stored in src/main/resources/adjective.yaml. The problem is that the URL for the file should be classpath:adjective.yaml, but the code in the following line:

https://github.com/swagger-api/swagger-parser/blob/v2.0.0-rc1/modules/swagger-parser-v3/src/main/java/io/swagger/parser/v3/OpenAPIV3Parser.java#L112

This code assumes the URL MUST be either http or file. This will not allow from loading the spec from the classpath.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:28 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
InfoSec812commented, Aug 19, 2022

There was a discussion on the Vert.x Discord about this and it has nothing to do with swagger-parser. You need to set a System Property as shown here: https://github.com/InfoSec812/budjet-vertx-hibernate-reactive-openapi/blob/main/modules/api/src/main/java/com/zanclus/BudjetLauncher.java#L6

1reaction
InfoSec812commented, Jan 31, 2018

@gracekarina I believe the (as yet unreleased) changes which @slinkydeveloper made for the 3.5.1 version of Vert.x are working perfectly and we can close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load API definition in Springboot - java - Stack Overflow
Looking to the springdoc-openapi configuration I could see the default swagger ui path is /swagger-ui.html so when I acessed the following URL:.
Read more >
openapi parser spec including files - Google Groups
RuntimeException : Unable to load RELATIVE ref: ./spec/another.yaml ... at io.vertx.ext.web.api.contract.openapi3. ... spec/another.yaml on the classpath
Read more >
Open API/Swagger: on run Code generator get runtime error
last stacktrace is about attempting to generate code from openapi 3 specification using second generator version - they are incompatible, we already have...
Read more >
OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and ...
Read more >
Springfox Reference Documentation - GitHub Pages
gradlew clean build publishToMavenLocal -i ... To bypass the standard release flow and upload directly to ... Spring Boot Applications.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found