Developer Docs

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.


API Documentation

C#Bot provides two APIs that can be utilised.

API documentation is available once the How do I run my app? in development mode.

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.

Swagger UI

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 /api/swagger/json/openapi.json.

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 autocomplete example

GraphiQL can be found at /admin/graphiql


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.

DocFX technical documentation


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.

React Styleguidist

On this page