Skip to content

Commit

Permalink
Adding in SQLAlchemyAutoSchema and creating a schema file
Browse files Browse the repository at this point in the history
  • Loading branch information
stevbark committed Jan 17, 2024
1 parent 5b8aa27 commit 0f92624
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Local
from openapi_server.repositories.service_provider_repository import HousingProviderRepository
from openapi_server.models.schema import service_provider_schema, service_provider_list_schema
from openapi_server.models.schema import *

housing_provider_repository = HousingProviderRepository()

Expand Down
7 changes: 4 additions & 3 deletions api/openapi_server/models/schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema

from api.openapi_server.models.database import *
from openapi_server.models.database import *


class UserSchema(SQLAlchemyAutoSchema):
Expand Down Expand Up @@ -205,6 +205,7 @@ class Meta:
include_relationships = True
load_instance = True


host_schema = HostSchema()
hosts_schema = HostSchema(many=True)
service_provider_schema = HousingProgramServiceProviderSchema()
service_provider_list_schema = HousingProgramServiceProviderSchema(many=True)
service_provider_list_schema = HousingProgramServiceProviderSchema(many=True)
2 changes: 1 addition & 1 deletion app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function huuApiBaseUrl(envHuuApiBaseUrl: string, mode: string): URL | never {
return new URL(envHuuApiBaseUrl);
} catch {
if (mode == 'development' || mode == 'test') {
return new URL('http://localhost:4040/api/');
return new URL('http://localhost:8080/api/');
} else {
throw new Error('VITE_HUU_API_BASE_URL is not configured with a URL');
}
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
volumes:
- ./api:/usr/src/app
ports:
- "8090:8090"
- "8080:8080"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/huu
links:
Expand All @@ -30,7 +30,7 @@ services:
build:
context: ./app
ports:
- "4040:80"
- "8080:80"
depends_on:
- api
volumes:
Expand Down

0 comments on commit 0f92624

Please sign in to comment.