mirror of
https://github.com/zerotier/zerotier-rust-api.git
synced 2026-05-22 16:26:25 -07:00
Merge pull request #16 from zerotier/ldr/dependency-update
general cleanup and updates
This commit is contained in:
@@ -0,0 +1 @@
|
||||
target
|
||||
Generated
+2548
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = ["zerotier-central-api", "zerotier-one-api"]
|
||||
@@ -1,9 +1,17 @@
|
||||
all: central service
|
||||
|
||||
central:
|
||||
curl -sSL https://docs.zerotier.com/openapi/centralv1.json > zerotier-central-api/openapi.json
|
||||
cd zerotier-central-api && cargo build && cargo clean
|
||||
curl -sSL https://docs.zerotier.com/openapi/central/v1.json > zerotier-central-api/openapi.json
|
||||
cd zerotier-central-api && cargo build
|
||||
|
||||
service:
|
||||
curl -sSL https://github.com/zerotier/zerotier-one-api-spec/releases/latest/download/openapi.yaml > zerotier-one-api/openapi.yaml
|
||||
cd zerotier-one-api && cargo build && cargo clean
|
||||
curl -sSL https://docs.zerotier.com/openapi/central/v1.json > zerotier-one-api/openapi.json
|
||||
cd zerotier-one-api && cargo build
|
||||
|
||||
audit:
|
||||
@if ! cargo-audit -h >/dev/null 2>&1; \
|
||||
then echo "Could not cargo-audit. (Hint: 'cargo install cargo-audit')"; \
|
||||
fi
|
||||
cargo audit
|
||||
|
||||
.PHONY: central service
|
||||
|
||||
Generated
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1771177547,
|
||||
"narHash": "sha256-trTtk3WTOHz7hSw89xIIvahkgoFJYQ0G43IlqprFoMA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ac055f38c798b0d87695240c7b761b82fc7e5bc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
Generated
+563
-451
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,24 @@
|
||||
[package]
|
||||
name = "zerotier-central-api"
|
||||
version = "1.2.1"
|
||||
version = "1.2.2"
|
||||
edition = "2021"
|
||||
description = "ZeroTier Central API for Rust"
|
||||
authors = ["Erik Hollensbe <erik.hollensbe@zerotier.com>", "Adam Ierymenko <adam.ierymenko@zerotier.com>"]
|
||||
authors = [
|
||||
"Erik Hollensbe <erik.hollensbe@zerotier.com>",
|
||||
"Adam Ierymenko <adam.ierymenko@zerotier.com>",
|
||||
"Lennon Day-Reynolds <lennon@zerotier.com>"
|
||||
]
|
||||
license = "BSD-3-Clause"
|
||||
|
||||
|
||||
[dependencies]
|
||||
progenitor-client = "0.8.0"
|
||||
reqwest = { version = "0.12", features = ["json", "stream"] }
|
||||
progenitor-client = "0.12"
|
||||
reqwest = { version = "0.13", features = ["json", "stream"] }
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
chrono = { version = "0.4", features = [ "serde" ] }
|
||||
uuid = { version = "1.7", features = [ "serde", "v4" ] }
|
||||
uuid = { version = "1.21", features = [ "serde", "v4" ] }
|
||||
futures = "0.3"
|
||||
serde_json = "1.0"
|
||||
regress = "0.4.1"
|
||||
regress = "0.10"
|
||||
|
||||
[build-dependencies]
|
||||
prettyplease = "0.2"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"description": "ZeroTier Central Network Management Portal API.<p>All API requests must have an API token header specified in the <code>Authorization: token xxxxx</code> format. You can generate your API key by logging into <a href=\"https://my.zerotier.com\">ZeroTier Central</a> and creating a token on the Account page.</p><p>eg. <code>curl -X GET -H \"Authorization: token xxxxx\" https://api.zerotier.com/api/v1/network</code></p><p><h3>Rate Limiting</h3></p><p>The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.</p> <p> You can get the OpenAPI spec here as well: <code>https://docs.zerotier.com/api/central/ref-v1.json</code></p>",
|
||||
"description": "ZeroTier Central Network Management Portal API.<p>All API requests must have an API token header specified in the <code>Authorization: token xxxxx</code> format. You can generate your API key by logging into <a href=\"https://my.zerotier.com\">ZeroTier Central</a> and creating a token on the Account page.</p><p>eg. <code>curl -X GET -H \"Authorization: token xxxxx\" https://api.zerotier.com/api/v1/network</code></p><p><h3>Rate Limiting</h3></p><p>The ZeroTier Central API implements rate limiting. Paid users are limited to 100 requests per second. Free users are limited to 20 requests per second.</p> <p> You can get the OpenAPI spec here as well: <code>https://docs.zerotier.com/openapi/centralv1.json</code></p>",
|
||||
"version": "v1",
|
||||
"title": "ZeroTier Central API",
|
||||
"contact": {
|
||||
|
||||
Generated
+563
-451
File diff suppressed because it is too large
Load Diff
@@ -1,24 +1,27 @@
|
||||
[package]
|
||||
name = "zerotier-one-api"
|
||||
version = "1.2.1"
|
||||
version = "1.2.2"
|
||||
edition = "2021"
|
||||
description = "OpenAPI bindings to the ZeroTierOne JSON API"
|
||||
authors = ["Erik Hollensbe <erik.hollensbe@zerotier.com>", "Adam Ierymenko <adam.ierymenko@zerotier.com>"]
|
||||
authors = [
|
||||
"Erik Hollensbe <erik.hollensbe@zerotier.com>",
|
||||
"Adam Ierymenko <adam.ierymenko@zerotier.com>",
|
||||
"Lennon Day-Reynolds <lennon@zerotier.com>"
|
||||
]
|
||||
license = "BSD-3-Clause"
|
||||
|
||||
[dependencies]
|
||||
progenitor-client = "0.8.0"
|
||||
reqwest = { version = "0.12", features = ["json", "stream"] }
|
||||
progenitor-client = "0.12"
|
||||
reqwest = { version = "0.13", features = ["json", "stream"] }
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
chrono = { version = "0.4", features = [ "serde" ] }
|
||||
uuid = { version = "1.7", features = [ "serde", "v4" ] }
|
||||
uuid = { version = "1.21", features = [ "serde", "v4" ] }
|
||||
futures = "0.3"
|
||||
serde_json = "1.0"
|
||||
serde_yaml = "0.9"
|
||||
regress = "0.4.1"
|
||||
regress = "0.10"
|
||||
|
||||
[build-dependencies]
|
||||
prettyplease = "0.2"
|
||||
progenitor = "0.8.0"
|
||||
serde_yaml = "0.9"
|
||||
serde_json = "1.0"
|
||||
syn = "2.0"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
fn main() {
|
||||
let src = "openapi.yaml";
|
||||
let src = "openapi.json";
|
||||
println!("cargo:rerun-if-changed={}", src);
|
||||
let file = std::fs::File::open(src).unwrap();
|
||||
println!("file:{:?}", file);
|
||||
let spec = serde_yaml::from_reader(file).unwrap();
|
||||
let spec = serde_json::from_reader(file).unwrap();
|
||||
let mut generator = progenitor::Generator::default();
|
||||
|
||||
let tokens = generator.generate_tokens(&spec).unwrap();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user