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

fix: chdir to dir of spec file to fix parsing error of refs #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

authurlan
Copy link

@authurlan authurlan commented Jan 25, 2022

  • Found error:
$ pwd
/home/foo/jsonrpc
$ jrgen docs-html sub/index.json
/home/foo/jsonrpc/node_modules/jrgen/src/utils.js:201                       
        throw error;             
        ^                                     
                                                                                                   
ResolverError: Error opening file "/home/foo/jsonrpc/methods/session/login.json" 
ENOENT: no such file or directory, open '/home/foo/jsonrpc/methods/session/login.json'          
    at ReadFileContext.callback (/home/foo/jsonrpc/node_modules/@apidevtools/json-schema-ref-parser/lib/resolvers/file.js:52:20)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:282:13) {
  code: 'ERESOLVER',                                                                               
  source: '/home/foo/jsonrpc/methods/session/login.json',                   
  path: null,                                
  toJSON: [Function: toJSON],                                                                      
  ioErrorCode: 'ENOENT',                                                                           
  [Symbol(nodejs.util.inspect.custom)]: [Function: inspect]                                        
}                                                                                                  
error Command failed with exit code 1.
  • Project files:
jsonrpc
|- sub
|  |- methods
|  |  |- session
|  |     |- login.json
|  |- index.json
|- node_modules
|- package.json

index.json uses "./methods/session/login.json" to refer login.json

@mzernetsch
Copy link
Owner

I think because of 1733459 it should work correctly now. Could you please test if the problem is still present after the next release?

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

Successfully merging this pull request may close these issues.

None yet

2 participants