Skip to content

Conversation

abus-sh
Copy link
Contributor

@abus-sh abus-sh commented Jun 23, 2025

Hello all,

While using this API as a reference for some personal projects, I noticed a few minor compatibility issues between this spec and what is returned. I wanted to know if there was any interest in merging any of these changes. If not, I'll happily maintain my fork for my projects.

Specifically, I noticed two issues:

  • ControllerNetworkMember does not mark lastAuthorizedCredentialType as nullable (link).
  • The type alias IP is not marked as oneOf (link)

The first issue can cause problems when a node has joined a private network but has not yet been authorized since the network controller will return null for that field. I fixed this by marking the field as nullable. The second issue is more of a compatibility issue. The official Rust crate for Zerotier depends on progenitor, which currently has several bugs related to anyOf string fields with format options (ex. "ipv4"). This means that requests to /controller/network/{network_id}/member/{node_id} will always fail to deserialize when using the official API spec and the official ZeroTier crate. I fixed this by marking converting the alias to a union and marking it as oneOf.

Thank you for your time, and for the API spec!

abus-sh added 3 commits June 23, 2025 12:46
IPv4 and IPv6 addresses are mutually exclusive. Marking with `oneOf` fixes
issues with deserializing responses that contain IPs in certain libraries
(ex. progenitor).
@CLAassistant
Copy link

CLAassistant commented Jun 23, 2025

CLA assistant check
All committers have signed the CLA.

@laduke
Copy link
Contributor

laduke commented Jun 23, 2025

I think I've run into those progenitor problems myself. Thanks for doing this.

@laduke laduke merged commit 5f6e3b5 into zerotier:main Jun 24, 2025
2 checks passed
@laduke
Copy link
Contributor

laduke commented Jun 24, 2025

thanks for doing that. need to figure out why the release script doesn't work anymore.

@laduke
Copy link
Contributor

laduke commented Jun 24, 2025

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.

3 participants