mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-14 01:31:50 +02:00
Just add ordering
This commit is contained in:
@@ -12,7 +12,7 @@ import { logIncomingMiddleware } from "./middlewares/logIncoming";
|
|||||||
import helmet from "helmet";
|
import helmet from "helmet";
|
||||||
import swaggerUi from "swagger-ui-express";
|
import swaggerUi from "swagger-ui-express";
|
||||||
import { OpenApiGeneratorV3 } from "@asteasolutions/zod-to-openapi";
|
import { OpenApiGeneratorV3 } from "@asteasolutions/zod-to-openapi";
|
||||||
import { registry } from "./openApi";
|
import { registry, openApiTags } from "./openApi";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { APP_PATH } from "./lib/consts";
|
import { APP_PATH } from "./lib/consts";
|
||||||
@@ -181,7 +181,8 @@ function getOpenApiDocumentation() {
|
|||||||
version: "v1",
|
version: "v1",
|
||||||
title: "Pangolin Integration API"
|
title: "Pangolin Integration API"
|
||||||
},
|
},
|
||||||
servers: [{ url: "/v1" }]
|
servers: [{ url: "/v1" }],
|
||||||
|
tags: openApiTags
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!process.env.DISABLE_GEN_OPENAPI) {
|
if (!process.env.DISABLE_GEN_OPENAPI) {
|
||||||
|
|||||||
+13
-8
@@ -4,24 +4,29 @@ export const registry = new OpenAPIRegistry();
|
|||||||
|
|
||||||
export enum OpenAPITags {
|
export enum OpenAPITags {
|
||||||
Site = "Site",
|
Site = "Site",
|
||||||
Org = "Organization",
|
|
||||||
PublicResource = "Public Resource",
|
PublicResource = "Public Resource",
|
||||||
PublicResourceLegacy = "Public Resource (Legacy)",
|
Target = "Resource Target",
|
||||||
PrivateResource = "Private Resource",
|
PrivateResource = "Private Resource",
|
||||||
PrivateResourceLegacy = "Private Resource (Legacy)",
|
Client = "Client",
|
||||||
|
Org = "Organization",
|
||||||
|
Domain = "Domain",
|
||||||
Policy = "Policy",
|
Policy = "Policy",
|
||||||
Role = "Role",
|
Role = "Role",
|
||||||
User = "User",
|
User = "User",
|
||||||
Invitation = "User Invitation",
|
|
||||||
Target = "Resource Target",
|
|
||||||
Rule = "Rule",
|
Rule = "Rule",
|
||||||
|
Invitation = "User Invitation",
|
||||||
AccessToken = "Access Token",
|
AccessToken = "Access Token",
|
||||||
GlobalIdp = "Identity Provider (Global)",
|
GlobalIdp = "Identity Provider (Global)",
|
||||||
OrgIdp = "Identity Provider (Organization Only)",
|
OrgIdp = "Identity Provider (Organization Only)",
|
||||||
Client = "Client",
|
|
||||||
ApiKey = "API Key",
|
ApiKey = "API Key",
|
||||||
Domain = "Domain",
|
|
||||||
Blueprint = "Blueprint",
|
Blueprint = "Blueprint",
|
||||||
Ssh = "SSH",
|
Ssh = "SSH",
|
||||||
Logs = "Logs"
|
Logs = "Logs",
|
||||||
|
PublicResourceLegacy = "Public Resource (Legacy)",
|
||||||
|
PrivateResourceLegacy = "Private Resource (Legacy)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Order here controls the order tags are displayed in Swagger UI
|
||||||
|
export const openApiTags = Object.values(OpenAPITags).map((name) => ({
|
||||||
|
name
|
||||||
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user