-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
feat: generate API as TypeDoc
docs
#1705
Conversation
87b24d6
to
6c5ba16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slick!
sounds good! I'll try this later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing. I have made some comments for improvement, so please check them out 👍
packages/orval/src/write-specs.ts
Outdated
let out = 'docs'; | ||
if (app.options.isSet('out')) { | ||
// Use the output location if it has been set in the external config. | ||
out = app.options.getValue('out'); | ||
} else if (output.workspace) { | ||
// Generate the docs in the workspace. | ||
out = upath.join(output.workspace, 'docs'); | ||
} else if (output.target) { | ||
const base = upath.dirname(output.target); | ||
// Generate the docs along side the output target. | ||
out = upath.join(base, 'docs'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the default specified location should be docs
regardless of workspace
or target
.
These options are not documents, but output destinations for the application's HTTP client, so their nature is different from the document we will be adding this time.
Also, by not supporting those followers, we get the simplicity of the source code.
let out = 'docs'; | |
if (app.options.isSet('out')) { | |
// Use the output location if it has been set in the external config. | |
out = app.options.getValue('out'); | |
} else if (output.workspace) { | |
// Generate the docs in the workspace. | |
out = upath.join(output.workspace, 'docs'); | |
} else if (output.target) { | |
const base = upath.dirname(output.target); | |
// Generate the docs along side the output target. | |
out = upath.join(base, 'docs'); | |
} | |
const out = app.options.getValue('out') || 'docs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. app.options.getValue('out')
defaults to docs
inside TypeDoc so we can simplify this slightly further and drop the || 'docs'
@huwshimi |
…oc config options to be passed
e00309d
to
ff3b8a4
Compare
@soartec-lab I rebased and fixed the merge conflict. Tests are passing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all good, Thanks!
TypeDoc
docs
Status
READY
Description
Generate docs from the output using TypeDoc.
Fixes: #773.
Related PRs
List related PRs against other branches:
Todos
Steps to Test or Reproduce
Outline the steps to test or reproduce the PR here.
orval.config.ts
for an example and adddocs: true,
to theoutput
object.yarn generate-api
.