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

feat(*): support serving API documentation pages when the server starts #370

Merged
merged 2 commits into from Oct 25, 2020

Conversation

iawia002
Copy link

@iawia002 iawia002 commented Oct 23, 2020

What this PR does / why we need it:

Support serving API documentation pages when the server starts, take examples/api-basic project as an example:

INFO  1023-18:11:50.982+08 config.go:309 | Listening on :8080
INFO  1023-18:11:52.009+08 builder.go:240 | Definitions: 1 Middlewares: 0 Path: /docs/api.v2.json
INFO  1023-18:11:52.009+08 builder.go:255 |   Method: Get Consumes: [] Produces: [application/json]
INFO  1023-18:11:52.009+08 builder.go:240 | Definitions: 1 Middlewares: 0 Path: /docs/api.v1.json
INFO  1023-18:11:52.009+08 builder.go:255 |   Method: Get Consumes: [] Produces: [application/json]
INFO  1023-18:11:52.009+08 builder.go:240 | Definitions: 1 Middlewares: 0 Path: /docs
INFO  1023-18:11:52.009+08 builder.go:255 |   Method: Get Consumes: [] Produces: [text/html]
INFO  1023-18:11:52.009+08 builder.go:240 | Definitions: 1 Middlewares: 0 Path: /api/v1/applications
INFO  1023-18:11:52.009+08 builder.go:255 |   Method: Create Consumes: [application/json] Produces: [application/json]
INFO  1023-18:11:52.009+08 builder.go:240 | Definitions: 1 Middlewares: 0 Path: /api/v2/applications
INFO  1023-18:11:52.009+08 builder.go:255 |   Method: Create Consumes: [application/json] Produces: [application/json]

Screen Shot 2020-10-23 at 18 20 36

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):

Fixes #

Reference to #302

Special notes for your reviewer:

/cc @xpofei

/kind feature

Release note:

Support serving API documentation pages when the server starts.

@caicloud-bot caicloud-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 23, 2020
@caicloud-bot caicloud-bot added kind/feature Categorizes issue or PR as related to a new feature. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. labels Oct 23, 2020
@xpofei
Copy link
Contributor

xpofei commented Oct 25, 2020

/lgtm

@caicloud-bot caicloud-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2020
@iawia002
Copy link
Author

/approve

@caicloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iawia002, xpofei

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@caicloud-bot caicloud-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 25, 2020
@caicloud-bot caicloud-bot merged commit 2fb93f5 into caicloud:master Oct 25, 2020
@iawia002 iawia002 deleted the api-gen branch October 25, 2020 06:40
iawia002 pushed a commit to iawia002/nirvana that referenced this pull request Oct 27, 2020
iawia002 pushed a commit to iawia002/nirvana that referenced this pull request Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants