Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference to missing file #6

Open
John15213 opened this issue Aug 6, 2021 · 1 comment
Open

Reference to missing file #6

John15213 opened this issue Aug 6, 2021 · 1 comment

Comments

@John15213
Copy link

Several API generators fail with the relative reference to apidocs.oas2.yml in the file, below is openapitools/openapi-generator-cli's result

Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 1, Warning count: 0
Errors:
-Unable to load RELATIVE ref: ./apidocs.oas2.yml path: /local

    at org.openapitools.codegen.config.CodegenConfigurator.toContext(CodegenConfigurator.java:546)
    at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:573)
    at org.openapitools.codegen.cmd.Generate.execute(Generate.java:433)
    at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
    at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
@John15213
Copy link
Author

John15213 commented Aug 6, 2021

So this seems to work (in YAML) if I replace

  parameters:
    - $ref: ''./apidocs.oas2.yml#/parameters/auth-bearer'

with

  parameters:
    - $ref: '#/parameters/auth-bearer'

on line 3284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant