Skip to content
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
17 changes: 12 additions & 5 deletions src/build/resolveOpenAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,13 @@ async function apiCategoriesUncached(): Promise<APICategory[]> {

Object.entries(data.paths).forEach(([apiPath, methods]) => {
Object.entries(methods).forEach(([method, apiData]) => {
Comment thread
sentry[bot] marked this conversation as resolved.
const isDeprecated = isDeprecatedOperationId(apiData.operationId);
const cleanOperationId = stripDeprecatedPrefix(apiData.operationId ?? '');
// Detect deprecation from either field independently — the (DEPRECATED)
// marker may sit on operationId even when a summary is present.
const isDeprecated =
isDeprecatedOperationId(apiData.operationId) ||
isDeprecatedOperationId(apiData.summary);
const titleSource = apiData.summary || apiData.operationId || '';
const cleanName = stripDeprecatedPrefix(titleSource);

let server = 'https://sentry.io';
if (apiData.servers && apiData.servers[0]) {
Expand All @@ -141,11 +146,13 @@ async function apiCategoriesUncached(): Promise<APICategory[]> {
categoryMap[tag].apis.push({
apiPath,
method,
name: cleanOperationId,
name: cleanName,
deprecated: isDeprecated,
server,
slug: slugify(cleanOperationId),
summary: apiData.summary,
slug: slugify(cleanName),
summary: apiData.summary
? stripDeprecatedPrefix(apiData.summary)
: apiData.summary,
descriptionMarkdown: apiData.description,
pathParameters: (apiData.parameters || []).filter(
p => p.in === 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/components/apiPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function ApiPage({api}: Props) {
</div>
<div className="flex flex-col md:flex-row gap-4">
<div className="w-full md:w-1/2">
{api.summary && <p>{api.summary}</p>}
{api.summary && api.summary !== api.name && <p>{api.summary}</p>}

{api.descriptionMarkdown && parseMarkdown(api.descriptionMarkdown)}
Comment thread
sentry[bot] marked this conversation as resolved.

Expand Down
Loading