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

API docs generated by reference-docs #550

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

greensong
Copy link

@greensong greensong commented May 22, 2024

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Add API documents.

If you want to generate API documents, you can do like this:

  1. In the api and config directories within reference-docs, create folders named with version numbers to store the new versions of swagger.json and toc.yaml files respectively.
  2. Run the following commands to generate the docs:
#!/bin/bash

git clone https://github.com/Seal-github/reference-docs.git
cd reference-docs || exit 1

# Generate API documents
# Please note, replace `v1.0` with your own version number.
make VERSION=v1.0

# Delete all the carriage returns (CR)
sed -i 's/\r//g' `find kwebsite -name "*.md"`
# Remove the redundant line feeds (LF)
sed -i '/^$/N;/^\n$/D' `find kwebsite -name "*.md"`

# Move the generated docs to Docusaurus doc path
rm -rf ../docs/reference/api-documents
mv -f kwebsite/content/en/docs ../docs/reference/api-documents
cd .. && rm -rf reference-docs

Signed-off-by: lingyu.hou <[email protected]>
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign dingyin after the PR has been reviewed.
You can assign the PR to them by writing /assign @dingyin in a comment when ready.

The full list of commands accepted by this bot can be found 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

@kubeedge-bot
Copy link
Collaborator

Welcome @greensong! It looks like this is your first PR to kubeedge/website 🎉

@kubeedge-bot kubeedge-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 22, 2024
Signed-off-by: lingyu.hou <[email protected]>
@@ -0,0 +1,20 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems actually no APIs in other resources dir, we can remove this directory.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Processed

@@ -0,0 +1,800 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operations still have another API: nodeUpgradeJob Ref: https://github.com/kubeedge/kubeedge/blob/master/pkg/apis/operations/v1alpha1/type.go

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shelley-BaoYue
Copy link
Collaborator

We can add a category file under every directory like https://github.com/kubeedge/website/blob/master/docs/architecture/edge/_category_.json, name this directory with Reference, KubeEdge API and Apps Resources.
image

@Shelley-BaoYue
Copy link
Collaborator

Sorry, I cannot find where are the common parameters from, could you help figure it out? Another optimization idea about common parameters: Now metadata details are described in every API file, autually these all seem to be the same, we can put metadata under common parameters.
Ref: https://karmada.io/docs/reference/karmada-api/common-definitions/object-meta#objectmeta

@Shelley-BaoYue
Copy link
Collaborator

Could you please introduce how these API files auto-generated step-by-step? including, but not limited to, the reference repository (now is your personal repo), what modified you have did in the repo, and how to use it. And we can also explore how to generate the Chinese version of the API documentation in the future.

@greensong greensong changed the title API docs generated by reference-docs [wip]API docs generated by reference-docs May 29, 2024
@kubeedge-bot kubeedge-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 29, 2024
Catherine-monk and others added 7 commits May 29, 2024 23:45
Signed-off-by: guolinsheng <[email protected]>
Signed-off-by: guolinsheng <[email protected]>
Signed-off-by: guolinsheng <[email protected]>
Signed-off-by: guolinsheng <[email protected]>
@kubeedge-bot kubeedge-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 13, 2024
Signed-off-by: guolinsheng <[email protected]>
@kubeedge-bot kubeedge-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 13, 2024
greensong and others added 3 commits June 13, 2024 18:03
@greensong greensong changed the title [wip]API docs generated by reference-docs API docs generated by reference-docs Jun 14, 2024
@kubeedge-bot kubeedge-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 14, 2024
Signed-off-by: guolinsheng <[email protected]>
Signed-off-by: guolinsheng <[email protected]>
@greensong
Copy link
Author

We've made changes to the revisions,If there are areas for improvement, we will continue to make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants