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

Auto-Generation of API CRD documentation #1

Merged
merged 4 commits into from
Nov 8, 2022
Merged

Conversation

Kartik-Garg
Copy link
Owner

@Kartik-Garg Kartik-Garg commented Nov 8, 2022

Added the command in make docs now so when make docs command is ran, the API CRD documentation is also created automatically with "API.md" name, created a folder called template which contains all the necessary files (template files, place-holder go file, json file and executable binary file) which are used/needed in the creating of the API CRD documentation

Signed-off-by: Kartik-Garg [email protected]

Change Overview

Whenever the command make docs is ran, it also automatically generates the CRD documentation, modified docs command in the makefile and added required files in the template folder
output for make docs would be:
running DOCS_CMD in the containerized build environment Removing everything under '_build'... Scanning... Validating... The HTML pages are in _build/html. /usr/local/lib/python3.6/site-packages/sphinx_rtd_theme/search.html:20: RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a <script> tag directly in your theme instead. {{ super() }} make[1]: Entering directory '/home/kartik/Documents/OpenSource/Kanister/kanister' running CMD in the containerized build environment I1108 08:43:15.790940 1 main.go:132] parsing go packages in directory ./pkg/apis/cr/v1alpha1 I1108 08:43:33.314445 1 main.go:234] using package=github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1 W1108 08:43:33.319322 1 main.go:445] not found external link source for type interface{} W1108 08:43:33.320886 1 main.go:445] not found external link source for type interface{} I1108 08:43:33.322448 1 main.go:170] written to API.md

Modified make docs command and added required files to the template folder, which would help us to create documentation automatically.

Snippet of the API.md file created:
Screenshot from 2022-11-08 14-52-53

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Added the command in make docs now so when make docs command is ran, the API CRD documentation is also created automatically with "API.md" name, created a folder called template which contains all the necessary files (template files, place-holder go file, json file and executable binary file)
which are used/needed in the creating of the API CRD documentation

Signed-off-by: Kartik-Garg <[email protected]>
@Kartik-Garg Kartik-Garg marked this pull request as ready for review November 8, 2022 07:50
Makefile Outdated Show resolved Hide resolved
@Kartik-Garg Kartik-Garg merged commit 98c8be4 into master Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-generate CRD Documentation
2 participants