Skip to content

Base path for sample json directory #7

@salman-mustafa1230

Description

@salman-mustafa1230

Hey plugin is really good.

I cannot give one base path for json schema directory. It will be good to give an option in apidoc.json like
"sampleJsonSchemaPath": "./schema/"

so we don't need to repeat our self in apidoc comment section.
In index.js file after getting schema we can check for the option in apidoc.json file

CODE:

let relativePath = path.join(path.dirname(filename), values.path)
if (app.packageInfos.sampleJsonSchemaPath) {
   relativePath = app.packageInfos.sampleJsonSchemaPath + values.path
   path.join(relativePath)
}
const data = fs.readFileSync( relativePath, 'utf8').toString();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions