Skip to content

lb4 openapi generator returns ResolverError when main spec contains schemas in subfolders #6963

Open
@manchuwook

Description

@manchuwook

Steps to reproduce

Created a default template OpenAPI spec using subfolders via Stoplight Studio

Current Behavior

command in models folder:
lb4 openapi --path ./models/openapi-spec.v1.json

Returns error:
Generation is aborted: ResolverError: Error opening file "c:\path\to\spec\models\subfolder-model.schema.v1.json"
ENOENT: no such file or directory, open 'c:\path\to\spec\models\subfolder-model.schema.v1.json'

Expected Behavior

I expect it to properly resolve relative links to the spec (not the src/root folder)

Link to reproduction sandbox

https://github.com/manchuwook/loopback-bug-subfolder for OpenAPI spec

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions