---
title: "Generating SR Widget Documentation Using Github Copilot"
canonical_url: "https://apidocs.sportradar.com/resources/widgets/docs/ai_prompts"
markdown_url: "https://apidocs.sportradar.com/resources/widgets/docs/ai_prompts.md"
last_updated: "2026-03-23T18:44:01Z"
---

# Generating SR Widget Documentation Using Github Copilot

This tutorial is for SR widget owners, who are generating documentation for their widgets in compliance with [BETS documentation guidelines](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/guidelines_product.md).

The goal of this tutorial is to demonstrate a procedure that results in a generated document, which fulfills or is very close to fulfilling [BETS documentation guidelines](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/guidelines_product.md).

## Prerequisites

- VS Code with Github Copilot plugins installed and configured
  - Github Copilot account
- Access to [widgets source code](https://gitlab.sportradar.ag/bets/widgets/)
- Access to [widgets demo page](https://widgets.sir.sportradar.com/widgets-demo#matches:\(matchId:64164833,sportId:1,uniqueTournamentId:36215\),settings:\(teamUid:702137,uniqueTournamentId:36215\),sidebar:\(selected:widgets\),widget:\(name:player.info\))
- Access to [API hub MarkDown guide](https://apidocs.sportradar.online/resources/api-hub/docs/documents/markdown)

## Steps

1. Open the main source file of your widget (could be index.jsx or props.ts, you know which one it is)
2. Go to the [API hub MarkDown guide](https://apidocs.sportradar.online/resources/api-hub/docs/documents/markdown)

- On the upper right click the **Copy page** button

3. Open Github Copilot chat

- Build context
  - Open the `generate_widget_integration_doc.txt` file
  - Render and paste prompts 1 through 5 into the chat
    - make sure you replace the placeholders with files
  - Allow website access requests that might come up
- Generate document
  - Paste prompt 6 into the chat

4. Wait, it takes a few minutes to generate the document
5. Examine the document

- Get Copilot to correct the document with follow up prompts.
- Examine the document again, see that it confirms to the [BETS documentation guidelines](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/guidelines_product.md)
- Do any required corrections
  - Link to tutorials and demos where appropriate
  - Add links to properties description where required
  - Remove any excess sections

6. Commit the document.
