@seamapi/nextlove-sdk-generator
Advanced tools
Comparing version 1.8.0 to 1.8.1
import type { SdkGeneratorOptions } from "../../lib/types.js"; | ||
export declare const generatePythonSDK: (options?: SdkGeneratorOptions) => Promise<any>; | ||
export declare const generatePythonSDK: (options?: SdkGeneratorOptions) => Promise<Record<string, string>>; |
@@ -1,1 +0,2 @@ | ||
export declare const generateRubySDK: () => Promise<any>; | ||
import type { SdkGeneratorOptions } from "../../lib/types.js"; | ||
export declare const generateRubySDK: (options?: SdkGeneratorOptions) => Promise<Record<string, string>>; |
@@ -1,2 +0,1 @@ | ||
import axios from "axios"; | ||
import { flattenObjSchema } from "../../lib/index.js"; | ||
@@ -28,6 +27,5 @@ import resourceRbTemplate from "./templates/snippets/resource.rb.template.js"; | ||
import { ignored_endpoint_paths } from "../../lib/endpoint-rules.js"; | ||
export const generateRubySDK = async () => { | ||
const openapi = await axios | ||
.get("https://connect.getseam.com/openapi.json") | ||
.then((res) => res.data); | ||
import resolveOpenapiSpec from "../../lib/openapi/resolve-openapi-spec.js"; | ||
export const generateRubySDK = async (options = {}) => { | ||
const openapi = await resolveOpenapiSpec(options); | ||
const routes = Object.entries(openapi.paths).map(([path, v]) => ({ | ||
@@ -34,0 +32,0 @@ path, |
{ | ||
"name": "@seamapi/nextlove-sdk-generator", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "Utilities for building NextLove SDK Generators", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -35,3 +35,3 @@ import type { ObjSchema, Route, SdkGeneratorOptions } from "lib/types.js" | ||
const fs: any = {} | ||
const fs: Record<string, string> = {} | ||
const class_map: Record<string, ClassFile> = {} | ||
@@ -38,0 +38,0 @@ const namespaces: string[][] = [] |
@@ -1,4 +0,3 @@ | ||
import axios from "axios" | ||
import { flattenObjSchema } from "lib/index.js" | ||
import type { ObjSchema, OpenAPISchema, Route } from "lib/types.js" | ||
import type { ObjSchema, Route, SdkGeneratorOptions } from "lib/types.js" | ||
import resourceRbTemplate from "./templates/snippets/resource.rb.template.js" | ||
@@ -29,7 +28,6 @@ import { pascalCase } from "change-case" | ||
import { ignored_endpoint_paths } from "lib/endpoint-rules.js" | ||
import resolveOpenapiSpec from "lib/openapi/resolve-openapi-spec.js" | ||
export const generateRubySDK = async () => { | ||
const openapi: OpenAPISchema = await axios | ||
.get("https://connect.getseam.com/openapi.json") | ||
.then((res) => res.data) | ||
export const generateRubySDK = async (options: SdkGeneratorOptions = {}) => { | ||
const openapi = await resolveOpenapiSpec(options) | ||
const routes: Route[] = Object.entries(openapi.paths).map(([path, v]) => ({ | ||
@@ -40,3 +38,3 @@ path, | ||
const fs: any = {} | ||
const fs: Record<string, string> = {} | ||
@@ -43,0 +41,0 @@ fs["README.md"] = readmeMdTemplate() |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
714143
9693