Skip to content

Commit

Permalink
chore: don't publish consul api docs from 2-15 (#2211)
Browse files Browse the repository at this point in the history
* don't publish consul api docs 2-15

* oops
  • Loading branch information
kendallstrautman authored Oct 25, 2023
1 parent faa7286 commit d5aa76b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pages/hcp/api-docs/consul/[[...page]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// Lib
import { fetchCloudApiVersionData } from 'lib/api-docs/fetch-cloud-api-version-data'
import { ApiDocsVersionData } from 'lib/api-docs/types'
// View
import OpenApiDocsView from 'views/open-api-docs-view'
import {
Expand Down Expand Up @@ -92,11 +93,20 @@ export const getStaticProps: GetStaticProps<
const versionData = await fetchCloudApiVersionData(
PAGE_CONFIG.githubSourceDirectory
)
/**
* TODO: add in support for conditionally publishing specs in hcp-specs repo
* For now just manually filtering out this spec as per request in slack.
* https://hashicorp.slack.com/archives/C5FSPUGDS/p1698178472462449
*/
const filteredVersionData = versionData.filter(
(version: ApiDocsVersionData) => version.versionId !== '2022-02-15'
)

// Generate static props based on page configuration, params, and versionData
return await getOpenApiDocsStaticProps({
...PAGE_CONFIG,
context: { params },
versionData,
versionData: filteredVersionData,
})
}

Expand Down

1 comment on commit d5aa76b

@vercel
Copy link

@vercel vercel bot commented on d5aa76b Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.