Skip to content

Commit

Permalink
[DOP-21268] - update RTD config
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-lixakov committed Nov 12, 2024
1 parent 6824462 commit b67c9e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH python -m poetry install --no-root --all-extras --with docs --without dev,test
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH python -m poetry show -v
- python -m pip list -v
- SYNCMASTER__DATABASE__URL=postgresql+psycopg://fake:fake@127.0.0.1:5432/fake SYNCMASTER__BROKER__URL=amqp://fake:faket@fake:5672/ SYNCMASTER__CRYPTO_KEY=crypto_key python -m syncmaster.backend.export_openapi_schema docs/_static/openapi.json
- SYNCMASTER__DATABASE__URL=postgresql+psycopg://fake:fake@127.0.0.1:5432/fake SYNCMASTER__BROKER__URL=amqp://fake:faket@fake:5672/ SYNCMASTER__CRYPTO_KEY=crypto_key SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=fakepython python -m syncmaster.backend.export_openapi_schema docs/_static/openapi.json

sphinx:
configuration: docs/conf.py
6 changes: 2 additions & 4 deletions syncmaster/backend/export_openapi_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@

from fastapi import FastAPI

from syncmaster.backend import application_factory
from syncmaster.backend.settings import BackendSettings as Settings
from syncmaster.backend import get_application


def get_openapi_schema(app: FastAPI) -> dict:
return app.openapi()


if __name__ == "__main__":
settings = Settings()
app = application_factory(settings)
app = get_application()
schema = get_openapi_schema(app)
file_path = sys.argv[1]
if not file_path:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def upgrade():
sa.Column("updated_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False),
sa.Column("is_deleted", sa.Boolean(), nullable=False),
sa.PrimaryKeyConstraint("id", name=op.f("pk__user")),
sa.UniqueConstraint("email", name=op.f("uq__user__email")),
)
op.create_index(op.f("ix__user__username"), "user", ["username"], unique=True)

Expand Down

0 comments on commit b67c9e9

Please sign in to comment.