Skip to content

Add OpenAPI tag-filter endpoint and fix local resource path#180

Open
Theosakamg wants to merge 1 commit into
masterfrom
feat/openapi-spec-tag-filter
Open

Add OpenAPI tag-filter endpoint and fix local resource path#180
Theosakamg wants to merge 1 commit into
masterfrom
feat/openapi-spec-tag-filter

Conversation

@Theosakamg

Copy link
Copy Markdown
Collaborator

Summary

Add a new endpoint to return a filtered OpenAPI document by tag and fix local raw resource path resolution that caused false 404 errors for OpenAPI files.

Changes

  • Add GET /openapi-spec/tag/:tag
  • Filter OpenAPI paths/operations by selected tag (case-insensitive)
  • Return 404 when tag is not found or has no linked endpoints
  • Preserve JSON/YAML behavior and cache headers
  • Refactor OpenAPI route helpers for format/file resolution
  • Fix ResourceManager local raw path resolution for:
    • getLocalResourceRaw
    • getLocalResourceRawWithMetadata

Validation

  • npm run build (backend) passes
  • Local raw OpenAPI file read smoke test passes

Notes

  • Commit includes only backend route and resource manager changes.

@Theosakamg Theosakamg requested a review from flovntp June 8, 2026 13:26
Comment on lines +26 to +30
if (sdks) {
return 'openapispec-upsun-sdks.json';
}

return format === 'yaml' ? 'openapispec-upsun.yaml' : 'openapispec-upsun.json';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (sdks) {
return 'openapispec-upsun-sdks.json';
}
return format === 'yaml' ? 'openapispec-upsun.yaml' : 'openapispec-upsun.json';
const filename = sdks ? 'openapispec-upsun-sdks' : 'openapispec-upsun';
return format === 'yaml' ? `${filename}.yaml` : `${filename}.json`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants