mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-10 11:50:44 +08:00
Devcontainer backend dev (#608)
add backend-dev devcontainer and extract openapi.json to docs/
This commit is contained in:
@@ -44,3 +44,18 @@ run `alembic revision --autogenerate -m "..."` ("..." is what you did) in the
|
||||
`/backend` directory. Then edit the newly created file. See
|
||||
[here](https://alembic.sqlalchemy.org/en/latest/tutorial.html) for more
|
||||
information.
|
||||
|
||||
## API Documentation
|
||||
|
||||
Once you have successfully started the backend server, you can access the
|
||||
default api docs at `localhost:8080/docs`. If you need to update the exported
|
||||
openapi.json in the docs/ folder you can run below command to `wget` them from
|
||||
the relevant local fastapi endpoint. This will enable anyone to just see API
|
||||
docs via something like
|
||||
[Swagger.io](https://editor.swagger.io/?url=https://raw.githubusercontent.com/LAION-AI/Open-Assistant/main/docs/docs/api/openapi.json)
|
||||
without having to actually set up and run a development backend.
|
||||
|
||||
```bash
|
||||
# save openapi.json to docs/docs/api
|
||||
wget localhost:8080/api/v1/openapi.json -O docs/docs/api/openapi.json
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user