This article defines the technical documentation available in a C#Bot target application.
Once a C#Bot application has been built and is running, some developer documentation becomes available which can assist developers in making custom changes.
C#Bot provides two APIs that can be utilised.
- REST API
- GraphQL API
API documentation is available once the How do I run my app? in
More details on running C#Bot can be found in this Running C#Bot.
REST API - Swagger
Swagger documentation is provided by the running target application, showing a full spec for the REST API written by the bots. This documentation is live, and automatically updates when new controller endpoints are added; be they custom or bot-written. This bot-written documentation also includes descriptions and details around the purpose of each endpoint.
GraphQL - GraphiQL/Altair
The second interface that is made available for exploring the GraphQL API is GraphiQL (see here for a live demo). This interface allows for introspective similar to Voyager, but the key difference being that it also explores the API by running queries against it. GraphiQL adds auto-complete to make this easier.
GraphiQL can be found at
DocFx is a tool which once installed will generate documentation which is served onto a static site by running
docfx serverside/src/docfx.json --serve. Once launched you can navigate to http://localhost:8080/ to view the server side documentation.
Note: Cross platform solutions for running this tool on MacOs and Linux requires Mono.
Client-side documentation can be hosted by using React Styleguidist and react-docgen-typsecript. This documentation provides a component development environment which acts as a living style guide for your team. This will provide information on Props & Methods for each component, as well as examples (where possible).
The documentation can be accessed by running
yarn styleguide from the
clientside directory, and navigating to localhost:6060 once the server is ready.