Skip to content

fix(spec): constrain namespace, website, and SSL status enums - #119

Merged
pcfreak30 merged 1 commit into
developfrom
chore/spec-sync-remaining-enums
Sep 4, 2026
Merged

fix(spec): constrain namespace, website, and SSL status enums#119
pcfreak30 merged 1 commit into
developfrom
chore/spec-sync-remaining-enums

Conversation

@pcfreak30

@pcfreak30 pcfreak30 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Syncs swagger.yaml to the live service spec and regenerates the client.

Adds enum constraints for domain/gateway/DANE namespace (icann, hns),
domain status (draft through onchain_managed), and SSL status (pending,
issuing, ready, failed). Codegen now prefixes the upload status enum
constants, so internalclient.Completed becomes
internalclient.UploadResultResponseStatusCompleted, and the SSL status
field is a named type; wrapper updates and test adjustments follow.


This PR syncs the SDK with the API specification by constraining several string fields to enums in the generated client code. Specifically:

  • Domain namespace and domain status fields in DomainDANERepublishResponse and DomainResponse are now typed enums with allowed values (icann/hns for namespace, and draft, records_generated, waiting_delegation, active, self_hosted, error, onchain_managed for status).
  • SSL status in SSLStatusInfo is now an enum with values pending, issuing, ready, failed.
  • The OpenAPI spec (swagger.yaml) was updated to include these enum constraints, keeping the spec and generated client in sync.
  • Upload status constants were renamed to be prefixed with the enum type name for consistency.
  • Tests were adjusted to use string conversion where enum values are compared, and a call site in websites.go now explicitly casts the enum to a string when returning.

This change strengthens type safety, prevents invalid values from being sent or received, and ensures the SDK adheres to the official API contract.

@kody-ai

kody-ai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@pcfreak30
pcfreak30 marked this pull request as ready for review September 4, 2026 13:11
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Code Coverage Report

Total Coverage: 13.5%

Generated from commit: 384a7d4
Repository: LumeWeb/ipfs-sdk

@pcfreak30
pcfreak30 merged commit 4e2cc41 into develop Sep 4, 2026
4 checks passed
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.

1 participant