Skip to content

Commit 5f6e3b5

Browse files
authored
Merge pull request #27 from abus-sh/main
Fixes for minor API deviations
2 parents ccadbc2 + 15d3340 commit 5f6e3b5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

main.tsp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import "@typespec/http";
22
import "@typespec/openapi";
3+
import "@typespec/openapi3";
34
import "@typespec/json-schema";
45
import "./variables.tsp";
56

@@ -402,7 +403,7 @@ model ControllerNetworkMember {
402403
creationTime: uSafeint;
403404
identity?: string;
404405
lastAuthorizedCredential: string | null;
405-
lastAuthorizedCredentialType: string;
406+
lastAuthorizedCredentialType: string | null;
406407
lastAuthorizedTime: uSafeint;
407408
lastDeauthorizedTime: uSafeint;
408409
nwid: ZTNetworkID;
@@ -458,7 +459,11 @@ scalar IPv4 extends string;
458459
@format("ipv6")
459460
scalar IPv6 extends string;
460461

461-
alias IP = IPv4 | IPv6;
462+
@oneOf
463+
union IP {
464+
ipv4: IPv4,
465+
ipv6: IPv6,
466+
}
462467

463468
scalar IPSlashPort extends string;
464469

test/integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function assertValid(
5757

5858
const ZEROTIER_API_SECRET = "asdf";
5959

60-
describe("API exercise", async function() {
60+
describe("API exercise", async function () {
6161
let network_id: string;
6262
const node_id = "1122334455";
6363
let container;
@@ -81,7 +81,7 @@ describe("API exercise", async function() {
8181
client = createCreateClient(ZEROTIER_API_SECRET, apiPort);
8282
});
8383

84-
describe("GET endpoints", async function() {
84+
describe("GET endpoints", async function () {
8585
const map: { path: PathsWithMethod<paths, "get">; id: string }[] = [
8686
{ path: "/status", id: "NodeStatus" },
8787
{ path: "/controller", id: "ControllerStatus" },

0 commit comments

Comments
 (0)