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

EES-5662 Fix public API docs URLs on API quick start guide #5480

Merged
merged 3 commits into from
Jan 6, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ jobs:
- task: AzureStaticWebApp@0
displayName: Deploy API docs
inputs:
app_location: /
app_location: build
output_location: '' # Leave this empty
skip_app_build: true
skip_api_build: true
azure_static_web_apps_api_token: $(docsDeploymentToken)
cwd: $(docsPath)/build
config_file_location: .
cwd: $(docsPath)

11 changes: 0 additions & 11 deletions infrastructure/templates/public-api/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,6 @@ module appGatewayModule 'application/shared/appGateway.bicep' = if (deployContai
backendName: resourceNames.publicApi.docsApp
rewriteSetName: docsRewriteSetName
}
{
// Redirect non-rooted URL (has no trailing slash) to the
// rooted URL so that relative links in the docs site
// can resolve correctly.
name: 'docs-root-redirect'
paths: ['/docs']
type: 'redirect'
redirectUrl: '${publicUrls.publicApi}/docs/'
redirectType: 'Permanent'
includePath: false
}
]
}
]
Expand Down
14 changes: 14 additions & 0 deletions src/explore-education-statistics-api-docs/source/404.html.md.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Page not found
hide_in_navigation: true
prevent_indexing: true
---

# Page not found

If you typed the web address, check it is correct.

If you pasted the web address, check you copied the entire address.

If the web address is correct or you selected a link or button, [contact our explore education statistics team](/support/index.html)
if you need any help or support.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingSlash": "auto",
"responseOverrides": {
"404": {
"rewrite": "/404.html"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function ApiDataSetQuickStart({
/>
<p>
{renderLink({
to: `${publicApiDocsUrl}/endpoints/GetDataSet`,
to: `${publicApiDocsUrl}/reference-v1/endpoints/GetDataSet/`,
children: 'Guidance: Get data set summary',
})}
</p>
Expand All @@ -93,7 +93,7 @@ export default function ApiDataSetQuickStart({
/>
<p>
{renderLink({
to: `${publicApiDocsUrl}/endpoints/GetDataSetMeta`,
to: `${publicApiDocsUrl}/reference-v1/endpoints/GetDataSetMeta/`,
children: 'Guidance: Get data set metadata',
})}
</p>
Expand All @@ -113,7 +113,7 @@ export default function ApiDataSetQuickStart({
/>
<p>
{renderLink({
to: `${publicApiDocsUrl}/endpoints/QueryDataSetGet`,
to: `${publicApiDocsUrl}/reference-v1/endpoints/QueryDataSetGet/`,
children: 'Guidance: Query data set (GET)',
})}
</p>
Expand All @@ -133,7 +133,7 @@ export default function ApiDataSetQuickStart({
/>
<p>
{renderLink({
to: `${publicApiDocsUrl}/endpoints/QueryDataSetPost`,
to: `${publicApiDocsUrl}/reference-v1/endpoints/QueryDataSetPost/`,
children: 'Guidance: Query data set (POST)',
})}
</p>
Expand All @@ -153,7 +153,7 @@ export default function ApiDataSetQuickStart({
/>
<p>
{renderLink({
to: `${publicApiDocsUrl}/endpoints/DownloadDataSetCsv`,
to: `${publicApiDocsUrl}/reference-v1/endpoints/DownloadDataSetCsv/`,
children: 'Guidance: Download data set as CSV',
})}
</p>
Expand Down
Loading