C#Bot Developer Documentation
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.
As the Swagger UI is hosted by the running application, it can be accessed at
/api/swagger/index.html of your running application, a JSON version can also be found at
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.