Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: trying to get docs page working #419

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cumulus_lambda_functions/uds_api/web_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
description='API to interact with UDS services',
docs_url=f'/{api_base_prefix}/docs',
redoc_url=f'/{api_base_prefix}/redoc',
openapi_url=f'/{api_base_prefix}/docs/openapi',
openapi_url=f'/{api_base_prefix}/openapi',
)
app.add_middleware(
CORSMiddleware,
Expand Down
1 change: 1 addition & 0 deletions tf-module/unity-cumulus/api_gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ resource "aws_api_gateway_deployment" "shared_services_api_gateway_deployment" {

depends_on = [
aws_api_gateway_integration.openapi_lambda_integration,
aws_api_gateway_integration.docs_lambda_integration,

aws_api_gateway_integration.misc_catalog_list_lambda_integration,
aws_api_gateway_integration.misc_stac_entry_lambda_integration,
Expand Down
33 changes: 33 additions & 0 deletions tf-module/unity-cumulus/api_gateway_04_docs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
resource "aws_api_gateway_resource" "docs_resource" {
rest_api_id = data.aws_api_gateway_rest_api.rest_api.id
parent_id = aws_api_gateway_resource.uds_api_base_resource.id
path_part = "docs"
}

resource "aws_api_gateway_method" "docs_method" {
rest_api_id = data.aws_api_gateway_rest_api.rest_api.id
resource_id = aws_api_gateway_resource.docs_resource.id
http_method = "GET"
authorization = "NONE"
request_parameters = {
"method.request.path.proxy" = true
}
}

resource "aws_api_gateway_integration" "docs_lambda_integration" {
rest_api_id = data.aws_api_gateway_rest_api.rest_api.id
resource_id = aws_api_gateway_resource.docs_resource.id
http_method = aws_api_gateway_method.docs_method.http_method
type = "AWS_PROXY"
uri = aws_lambda_function.uds_api_1.invoke_arn
integration_http_method = "POST"

# cache_key_parameters = ["method.request.path.proxy"]

timeout_milliseconds = 29000
# request_parameters = {
# "integration.request.path.proxy" = "method.request.path.proxy"
# }
}

##########################################################################################################################
Loading