Project for generating Rhino/Grasshopper API documentation. This repo is split into the following parts:
src contains a Visual Studio project (api_docify) that parses source code and generates markdown and json files that represent the public facing API for a project
a Vue 3 + Vite + Tailwind + Pinia SPA that creates a web site based on the json files created. This site currently gets published to heroku and can be viewed at
https://mcneel-apidocs.herokuapp.com/api/rhinocommon/
Instructions for building and testing the web app can be found at web app readme
$ api_docify --name=<proj_name> <proj_path> <proj_output_js>
$ api_docify --name=<proj_name> <proj_path> <proj_output_js> <examples_path> <examples_output_js>Example
$ api_docify.exe --name="RhinoCommon" "%RHINO4SRC%/rhinocommon/dotnet" "src/modules/docify/webapp/src/RhinoCommonApi.js"- Ensure node and yarn are installed
- Open this folder in VS Code
- Run
cd webapp && yarnto install dependencies - Run
CMD+Shift+P > Run Task > docify build(or run the generator) to produce the JSON - Run
cd webapp && yarn devto start the site
Classes that derive from a .NET Base Class Library type (e.g. RuntimeDocumentDataTable : Dictionary<object, object>) inherit members the syntactic parser can't see. build also emits bcl_api.json next to api_info.json: it reflects the .NET reference assemblies (and their XML docs) via Roslyn to produce authoritative metadata for those base types, which the web app renders as inherited members linking to Microsoft Learn. It is generated, not hand-written — regenerate from committed data (no Rhino source needed) with:
$ dotnet run --project src -- bcl webapp/src/api_info.json webapp/src/bcl_api.jsonSome namespaces may need methodgen to be run on the source first before documentation can be extracted. You can do this by building Rhino from source.