Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit a38869b

Browse files
committed
Update documentation with TypeSpec instructions and general changes
1 parent 107b1ff commit a38869b

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1+
<center>
2+
3+
[![Build/Deploy OpenAPI specification](https://github.com/polyphony-chat/docs/actions/workflows/deploy-openapi-spec.yml/badge.svg)](https://github.com/polyphony-chat/docs/actions/workflows/deploy-openapi-spec.yml)
4+
[![mkdocs documentation](https://github.com/polyphony-chat/docs/actions/workflows/python-mkdocs.yml/badge.svg)](https://github.com/polyphony-chat/docs/actions/workflows/python-mkdocs.yml)
5+
[![Discord]][Discord-invite]
6+
[![Code-of-conduct-shield]][Code-of-conduct]
7+
8+
[Discord]: https://img.shields.io/badge/Discord_Server-390075
9+
[Discord-invite]: https://discord.com/invite/m3FpcapGDD
10+
[Code-of-conduct-shield]: https://img.shields.io/badge/Code_of_Conduct-eb00ff
11+
[Code-of-conduct]: https://github.com/polyphony-chat/.github/blob/main/CODE_OF_CONDUCT.md
12+
13+
</center>
14+
115
# Documentation
216

3-
Specification documents and API documentation for the polyproto federated messaging protocol
4-
Built with mkdocs-material and python3.12
17+
Specification documents and API documentation for the polyproto federated messaging protocol.
18+
19+
Documentation built with mkdocs-material and python3.12
20+
21+
API documentation built with [TypeSpec](https://typespec.io).
22+
23+
## Pre-compiled OpenAPI schema(s)
24+
25+
Find the pre-compiled OpenAPI schema file(s) in the [`/api/build`](https://github.com/polyphony-chat/docs/tree/main/api/build) directory. The schema is automatically built and deployed to the `main` branch on every push to the `main` branch.
526

627
## File structure
728

@@ -22,6 +43,8 @@ You should also read our [Code of Conduct](https://github.com/polyphony-chat/.gi
2243

2344
## Setting up a development environment
2445

46+
### Documentation
47+
2548
You will need the following things installed on your computer:
2649

2750
- `python3.12`
@@ -33,3 +56,20 @@ Optionally, you can install [`vale`](https://vale.sh/) for spell-/grammar checki
3356

3457
Use `pip install -r requirements.txt` to install the required dependencies, and `mkdocs build` or
3558
`mkdocs serve` to build the project or serve it on localhost.
59+
60+
### API documentation
61+
62+
You will need the following things installed on your computer:
63+
64+
- `Node.js >= 20`
65+
- `npm`, `pnpm` or `yarn`
66+
- `git`
67+
- `TypeSpec` - install it globally with `npm install -g @typespec/compiler`
68+
69+
1. Navigate to the `/api/src` directory.
70+
2. Select the project you want to compile. In this example, we are compiling the `core` project.
71+
Navigate to that directory.
72+
3. Run `tsp install` to install the dependencies.
73+
4. Run `tsp compile .` to compile the project or `tsp compile --watch .` to automatically recompile
74+
the project when you save a file.
75+
5. The compiled OpenAPI3 schema will be in the `$PROJECT/tsp-output/@typespec/openapi3` directory.

0 commit comments

Comments
 (0)