OpenAPITools / OpenAPITools/openapi-generator

[BUG] java.lang.RuntimeException: Unable to load RELATIVE ref

Open
#12,117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

java.lang.RuntimeException: Unable to load RELATIVE ref: ../../schemas/dynamic/all-collections.yaml path: C:\work\workspaces\ogcapi-tiles

openapi-generator version

6.0.0-beta and 5.4.0.

OpenAPI declaration file content or url

https://github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/ogcapi-tiles-1.yaml

Generation Details

<build> <plugins> <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <!-- RELEASE_VERSION --> <version>5.4.0</version> <!-- /RELEASE_VERSION --> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>Path tp ogcapi-tiles-1.yaml</inputSpec> <generatorName>java</generatorName> <configOptions> <sourceFolder>src/gen/java/main</sourceFolder> </configOptions> </configuration> </execution> </executions> </plugin> </plugins> </build>

Steps to reproduce

Run mvn clean compile

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the Maven plugin configuration and the linked openapi/ogcapi-tiles-1.yaml declaration, focusing on its ../../schemas/dynamic/all-collections.yaml reference. Trace the relative-reference loading path in OpenAPI Generator and add coverage for this declaration or an equivalent relative reference; done means mvn clean compile no longer raises the RuntimeException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.