-
Notifications
You must be signed in to change notification settings - Fork 105
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(*): support serving the API documentation page when the server starts #302
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
IIUC, we don't require a uniform project structure now? /assign @hezhizhen |
We do have a recommended structure, for new projects, they should all use this recommended structure, but for old projects, we haven't forced them to migrate to this recommended structure. |
It is a good idea that serves the API docs page when the server starts. But I find that it takes a long time to generate API docs for some projects such as Cyclone, which will make the server starts very slowly. |
Yes, of course, that's the price if you want to serve the API documentation page when the server starts. Nirvana needs to do a lot of analysis before starting the server. |
make it optional and disable by default?
…On Tue, Apr 14, 2020 at 7:52 PM Xinzhao Xu ***@***.***> wrote:
But I find that it takes a long time to generate API docs for some
projects such as Cyclone, which will make the server starts very slowly.
Yes, of course, that's the price if you want to serve the API
documentation page when the server starts. Nirvana needs to do a lot of
analysis before starting the server.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#302 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQXAAL443ZSSMTHYRDRWKTRMRE7VANCNFSM4MDYQQ6A>
.
|
It is disabled by default. |
Due it may take a long time to generate API docs when the server starts in some big projects, which is unacceptable. So I'm gonna close this PR. /close |
What this PR does / why we need it:
We can now choose to serve the API docs page with the API server itself, take api-basic example project as an example, with this simple config we can let nirvana generates the API docs file and serves the API docs page when the server starts:
Start the server, API docs related pages will serve under
/docs
path:And API docs files will be created in the
...examples/api-basic
directory.BTW, ReDoc has been replaced with the Swagger UI.
Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
close #290
Special notes for your reviewer:
/cc @supereagle @kdada
Release note: