Skip to content

fix(infra,backend): dedupe IMDS hardening, add Swagger docs to health/gists/stats - #1696

Merged
BigBen-7 merged 1 commit into
PinSpace-Org:mainfrom
feyishola:fix/swagger-docs-and-imds-hardening
Nov 20, 2026
Merged

BigBen-7 merged 1 commit into
PinSpace-Org:mainfrom
feyishola:fix/swagger-docs-and-imds-hardening

Conversation

@feyishola

Copy link
Copy Markdown
Contributor

Summary

  • ec2-node-class.yaml defined metadataOptions twice; YAML keeps the last key, so httpPutResponseHopLimit: 1 and the IPv6 setting were silently dropped. Merged into a single block with all four settings.
  • HealthController had no Swagger decorators; added @ApiTags, @ApiOperation and a documented response schema for /v1/health.
  • GistsController had 8 routes, 7 @ApiOperation and no response decorators; added the missing @ApiOperation plus @ApiOkResponse/@ApiCreatedResponse/@ApiNotFoundResponse/@ApiTooManyRequestsResponse, and @ApiProperty on the Gist entity so the schema renders real fields.
  • StatsController had 4 routes with no response decorators; added @ApiOkResponse schemas for each route's actual response shape and @ApiBadRequestResponse for the two routes that validate from/to.

Closes #1609, Closes #1608, Closes #1606, Closes #1607

Test plan

  • npx tsc --noEmit passes
  • npm run build passes
  • npx jest health gists stats — 10 suites, 67 passed
  • Manually reviewed ec2-node-class.yaml to confirm a single metadataOptions block retaining httpPutResponseHopLimit: 1 and httpProtocolIPv6: disabled

🤖 Generated with Claude Code

…/gists/stats

- ec2-node-class.yaml had two metadataOptions blocks; YAML keeps the
  last key so httpPutResponseHopLimit and the IPv6 setting were
  silently dropped. Merged into a single block.
- HealthController had no Swagger decorators; added @apitags,
  @apioperation and a documented response schema.
- GistsController's 8 routes had 7 @apioperation and no response
  decorators; added the missing @apioperation plus
  @ApiOkResponse/@ApiCreatedResponse/@ApiNotFoundResponse/
  @ApiTooManyRequestsResponse, and @ApiProperty on the Gist entity so
  it renders a real schema.
- StatsController's 4 routes had no response decorators; added
  @ApiOkResponse schemas and @ApiBadRequestResponse for invalid
  ranges.

Closes PinSpace-Org#1609, Closes PinSpace-Org#1608, Closes PinSpace-Org#1606, Closes PinSpace-Org#1607

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Nov 19, 2026

Copy link
Copy Markdown

@feyishola Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@BigBen-7
BigBen-7 merged commit 10f9422 into PinSpace-Org:main Nov 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants