profile view

This commit is contained in:
2026-04-03 13:40:06 +05:30
parent aa04b105d0
commit 399b2656b8
7 changed files with 95 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import SwaggerParser from "@apidevtools/swagger-parser";
import { AppConfig, ResourceConfig, ResourceField, FieldType } from "../types/config";
import { configuration } from "../configuration";
import { configuration, profileConfiguration } from "../configuration";
/**
* Maps OpenAPI property types to our internal FieldType
@@ -115,7 +115,7 @@ export async function loadConfigFromOpenApi(baseUrl: string): Promise<AppConfig>
resourcePaths[base].methods.push(...methods);
// Identify the list endpoint for this resource
if (!path.includes("{") && paths[path]?.get?.responses?.["200"]) {
if (!resourcePaths[base].listPath && !path.includes("{") && paths[path]?.get?.responses?.["200"]) {
resourcePaths[base].listPath = path;
}
}
@@ -170,5 +170,6 @@ export async function loadConfigFromOpenApi(baseUrl: string): Promise<AppConfig>
baseUrl: serverBaseUrl,
authBaseUrl: authBaseUrl,
resources,
profile: profileConfiguration,
};
}