@seamapi/nextlove-sdk-generator
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -57,2 +57,3 @@ export const generateSeamClient = ({ resource_clients, resource_object_names, }) => { | ||
$status_code = $response->getStatusCode(); | ||
$request_id = $response->getHeaderLine('seam-request-id'); | ||
@@ -74,3 +75,4 @@ $res_json = null; | ||
": " . | ||
$res_json->error->message | ||
$res_json->error->message . | ||
" [Request ID: " . $request_id . "]" | ||
); | ||
@@ -83,3 +85,4 @@ } | ||
throw new Exception( | ||
"HTTP Error: " . $error_message . " [" . $status_code . "] " . $method . " " . $path | ||
"HTTP Error: " . $error_message . " [" . $status_code . "] " . $method . " " . $path . | ||
" [Request ID: " . $request_id . "]" | ||
); | ||
@@ -96,3 +99,4 @@ } | ||
" " . | ||
$path | ||
$path . | ||
" [Request ID: " . $request_id . "]" | ||
); | ||
@@ -99,0 +103,0 @@ } |
import type { AllOfSchema, ObjSchema, PropertySchema } from "../../lib/types.js"; | ||
export declare const flattenObjSchema: (s: ObjSchema | { | ||
oneOf: Array<ObjSchema>; | ||
} | { | ||
allOf: Array<ObjSchema>; | ||
}) => ObjSchema; | ||
export declare const deepFlattenAllOfSchema: (s: AllOfSchema) => Exclude<PropertySchema, AllOfSchema> | undefined; |
@@ -23,2 +23,5 @@ import lodash from "lodash"; | ||
} | ||
if ("allOf" in s) { | ||
return deepFlattenAllOfSchema(s); | ||
} | ||
throw new Error(`Unknown schema type "${s.type}"`); | ||
@@ -25,0 +28,0 @@ }; |
{ | ||
"name": "@seamapi/nextlove-sdk-generator", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"description": "Utilities for building NextLove SDK Generators", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -70,2 +70,3 @@ import type { PhpClient } from "./php-client.js" | ||
$status_code = $response->getStatusCode(); | ||
$request_id = $response->getHeaderLine('seam-request-id'); | ||
@@ -87,3 +88,4 @@ $res_json = null; | ||
": " . | ||
$res_json->error->message | ||
$res_json->error->message . | ||
" [Request ID: " . $request_id . "]" | ||
); | ||
@@ -96,3 +98,4 @@ } | ||
throw new Exception( | ||
"HTTP Error: " . $error_message . " [" . $status_code . "] " . $method . " " . $path | ||
"HTTP Error: " . $error_message . " [" . $status_code . "] " . $method . " " . $path . | ||
" [Request ID: " . $request_id . "]" | ||
); | ||
@@ -109,3 +112,4 @@ } | ||
" " . | ||
$path | ||
$path . | ||
" [Request ID: " . $request_id . "]" | ||
); | ||
@@ -112,0 +116,0 @@ } |
@@ -17,2 +17,5 @@ import type { | ||
} | ||
| { | ||
allOf: Array<ObjSchema> | ||
} | ||
): ObjSchema => { | ||
@@ -43,2 +46,7 @@ if ("type" in s && s.type === "object") return s | ||
} | ||
if ("allOf" in s) { | ||
return deepFlattenAllOfSchema(s) as ObjSchema | ||
} | ||
throw new Error(`Unknown schema type "${s.type}"`) | ||
@@ -45,0 +53,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
692994
9334