Fixes for minor API deviations #27
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 marklastAuthorizedCredentialType
as nullable (link).IP
is not marked asoneOf
(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 toanyOf
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 asoneOf
.Thank you for your time, and for the API spec!