Skip to content

Commit d4e6786

Browse files
authored
chore: add badge for deprecated endpoints and remove isRPC from frontmatter (#1117)
1 parent 320641f commit d4e6786

File tree

100 files changed

+172
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+172
-210
lines changed

app/[locale]/[...slug]/page.tsx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import { getMDXComponents } from '@/components/mdx';
2323
import { Mermaid } from '@/components/mdx/mermaid';
2424
import { APIPage } from '@/components/openapi/api-page';
2525
import { API } from '@/components/reference/api-page';
26-
import { Badge } from '@/components/ui/badge';
2726
import * as customIcons from '@/components/ui/icon';
2827
import { TagFilterSystem } from '@/components/ui/tag-filter-system';
2928
import { getAPIConfig } from '@/lib/api-config';
29+
import { checkIfDeprecated } from '@/lib/check-deprecated';
3030
import { i18n } from '@/lib/i18n';
3131
import { getAllFilterablePages, source } from '@/lib/source';
3232
import type { HeadingProps } from '@/types';
@@ -57,6 +57,9 @@ export default async function Page(props: {
5757
.join('\n')
5858
.trim();
5959

60+
// Check if this page contains deprecated API operations
61+
const isDeprecated = await checkIfDeprecated(rawMarkdownContent);
62+
6063
const MDX = page.data.body;
6164

6265
if (!MDX) {
@@ -213,28 +216,16 @@ export default async function Page(props: {
213216
BETA
214217
</span>
215218
)}
216-
{page.data.isRpc && (
217-
<Badge
218-
variant="outline"
219-
className="cursor-pointer font-normal text-[10px] px-1 py-0.5 uppercase bg-orange-500 text-neutral-950 dark:bg-brand-orange border-none"
220-
>
221-
RPC node
222-
</Badge>
219+
{isDeprecated && (
220+
<span className="mt-1 font-semibold text-[10px] px-2 py-0.5 rounded uppercase tracking-wider bg-brand-gold/10 text-brand-gold dark:bg-brand-gold/20">
221+
Deprecated
222+
</span>
223223
)}
224224
</div>
225225
{page.data.llm !== false && <LLMShare content={LLMContent} />}
226226
</div>
227227
<DocsPageDescription />
228228

229-
{/* RPC endpoint callout */}
230-
{page.data.isRpc && (
231-
<Callout type="info" title="About RPC endpoints">
232-
These are served by Stacks nodes, not directly operated by Hiro. Availability and
233-
performance may vary depending on upstream node health. For guaranteed
234-
performance, run your own node or talk to us about dedicated options.
235-
</Callout>
236-
)}
237-
238229
{/* Render TagFilterSystem if tags are present in frontmatter */}
239230
{page.data.tags && page.data.tags.length > 0 && (
240231
<TagFilterSystem

components/openapi/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface OpenAPIOperation {
1111
responses?: Record<string, OpenAPIResponse>;
1212
security?: Array<Record<string, string[]>>;
1313
tags?: string[];
14+
deprecated?: boolean;
1415
}
1516

1617
export interface OpenAPIParameter {

content/docs/en/apis/stacks-node-rpc-api/reference/accounts/info.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/blocks/block-by-height-v3.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/blocks/block-proposal.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/blocks/upload-block.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/fees/estimate.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/fees/transfer-estimate.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/info/core-api.mdx

Lines changed: 0 additions & 1 deletion

content/docs/en/apis/stacks-node-rpc-api/reference/info/health.mdx

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)