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

Commit 1bdd930

Browse files
committed
feat: tsp update to 1.0.0, oapi update to 3.1
1 parent 91c82cb commit 1bdd930

16 files changed

+944
-3115
lines changed

.github/workflows/deploy-openapi-spec.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Deploy OpenAPI specification
1+
name: Build and Deploy OpenAPI v3.1 specification
22
on:
33
push:
44
branches:
@@ -31,7 +31,7 @@ jobs:
3131
- name: Commit OpenAPI specification to repository
3232
run: |
3333
tree -L 2
34-
mv ./src/core/tsp-output/@typespec/openapi3/openapi.v1.0-beta.1.yaml ./build/core-openapi3.yaml
34+
mv ./src/core/tsp-output/schema/openapi.v1.0-beta.1.yaml ./build/core-openapi3.yaml
3535
git add ./build/*
3636
git commit -m "[bot]update openapi3 schema" || true
3737
git push || true

.gitignore

Lines changed: 3 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -2,169 +2,10 @@
22

33
# Default TypeSpec output
44
dist/
5+
tsp-output/
56

67
# Dependency directories
78
node_modules/
89

9-
# Byte-compiled / optimized / DLL files
10-
__pycache__/
11-
*.py[cod]
12-
*$py.class
13-
14-
# C extensions
15-
*.so
16-
17-
# Distribution / packaging
18-
.Python
19-
develop-eggs/
20-
dist/
21-
downloads/
22-
eggs/
23-
.eggs/
24-
lib/
25-
lib64/
26-
parts/
27-
sdist/
28-
var/
29-
wheels/
30-
share/python-wheels/
31-
*.egg-info/
32-
.installed.cfg
33-
*.egg
34-
MANIFEST
35-
36-
# PyInstaller
37-
# Usually these files are written by a python script from a template
38-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
39-
*.manifest
40-
*.spec
41-
42-
# Installer logs
43-
pip-log.txt
44-
pip-delete-this-directory.txt
45-
46-
# Unit test / coverage reports
47-
htmlcov/
48-
.tox/
49-
.nox/
50-
.coverage
51-
.coverage.*
52-
.cache
53-
nosetests.xml
54-
coverage.xml
55-
*.cover
56-
*.py,cover
57-
.hypothesis/
58-
.pytest_cache/
59-
cover/
60-
61-
# Translations
62-
*.mo
63-
*.pot
64-
65-
# Django stuff:
66-
*.log
67-
local_settings.py
68-
db.sqlite3
69-
db.sqlite3-journal
70-
71-
# Flask stuff:
72-
instance/
73-
.webassets-cache
74-
75-
# Scrapy stuff:
76-
.scrapy
77-
78-
# Sphinx documentation
79-
docs/_build/
80-
81-
# PyBuilder
82-
.pybuilder/
83-
target/
84-
85-
# Jupyter Notebook
86-
.ipynb_checkpoints
87-
88-
# IPython
89-
profile_default/
90-
ipython_config.py
91-
92-
# pyenv
93-
# For a library or package, you might want to ignore these files since the code is
94-
# intended to run in multiple environments; otherwise, check them in:
95-
# .python-version
96-
97-
# pipenv
98-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
100-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
101-
# install all needed dependencies.
102-
#Pipfile.lock
103-
104-
# poetry
105-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106-
# This is especially recommended for binary packages to ensure reproducibility, and is more
107-
# commonly ignored for libraries.
108-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109-
#poetry.lock
110-
111-
# pdm
112-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113-
#pdm.lock
114-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
115-
# in version control.
116-
# https://pdm.fming.dev/#use-with-ide
117-
.pdm.toml
118-
119-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
120-
__pypackages__/
121-
122-
# Celery stuff
123-
celerybeat-schedule
124-
celerybeat.pid
125-
126-
# SageMath parsed files
127-
*.sage.py
128-
129-
# Environments
130-
.env
131-
.venv
132-
env/
133-
venv/
134-
ENV/
135-
env.bak/
136-
venv.bak/
137-
138-
# Spyder project settings
139-
.spyderproject
140-
.spyproject
141-
142-
# Rope project settings
143-
.ropeproject
144-
145-
# mkdocs documentation
146-
/site
147-
148-
# mypy
149-
.mypy_cache/
150-
.dmypy.json
151-
dmypy.json
152-
153-
# Pyre type checker
154-
.pyre/
155-
156-
# pytype static type analyzer
157-
.pytype/
158-
159-
# Cython debug symbols
160-
cython_debug/
161-
162-
# PyCharm
163-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
164-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
165-
# and can be added to the global gitignore or merged into this file. For a more nuclear
166-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
167-
#.idea/
168-
169-
# macOS
170-
.DS_Store
10+
# MacOS
11+
.DS_Store

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ API documentation built with [TypeSpec](https://typespec.io).
1212

1313
## Pre-compiled OpenAPI schema(s)
1414

15-
Find the pre-compiled OpenAPI schema file(s) in the [`/build`](https://github.com/polyphony-chat/docs/tree/main/build) directory. The schema is automatically built and deployed to the `main` branch on every push to the `main` branch.
15+
Find the pre-compiled OpenAPI v3.1 schema file(s) in the [`/build`](https://github.com/polyphony-chat/docs/tree/main/build) directory. The schema is automatically built and deployed to the `main` branch on every push to the `main` branch.
1616

1717
## Contributing
1818

@@ -25,7 +25,8 @@ You should also read our [Code of Conduct](https://github.com/polyphony-chat/.gi
2525
You will need the following things installed on your computer:
2626

2727
- `Node.js >= 20`
28-
- `npm` `pnpm` or `yarn`
28+
- `npm`. I personally prefer `pnpm`, but have found it to *not work* with TypeSpec. Maybe this is
29+
a me-issue, but I recommend `npm` for best compatibility nonetheless.
2930
- `git`
3031
- `TypeSpec` - install it globally with `npm install -g @typespec/compiler`
3132

src/chat/main.tsp

Whitespace-only changes.

src/chat/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "polyproto-chat",
3+
"version": "0.1.0",
4+
"type": "module",
5+
"peerDependencies": {
6+
"@typespec/compiler": "latest"
7+
},
8+
"devDependencies": {
9+
"@typespec/compiler": "latest"
10+
},
11+
"private": true
12+
}

src/chat/tspconfig.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
emit:
2+
- "@typespec/openapi3"
3+
options:
4+
"@typespec/openapi3":
5+
file-type: "yaml"
6+
openapi-versions: ["3.0", "3.1"]

0 commit comments

Comments
 (0)