Skip to content

Commit

Permalink
chore(swagger-zodios): export endpoints too (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
b6pzeusbc54tvhw5jgpyw8pwz2x6gs authored Dec 27, 2023
1 parent aae446a commit 9b9674c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/swagger-zodios/src/components/Definitions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ function Template({
}: TemplateProps): ReactNode {
return (
<>
{`const endpoints = makeApi([${definitions.join(',')}])`}
{`export const endpoints = makeApi([${definitions.join(',')}])`}
{`export const getAPI = (baseUrl: string) => new Zodios(baseUrl, endpoints)`}
{baseURL && `export const ${name} = new Zodios('${baseURL}', endpoints)`}
{!baseURL && `export const ${name} = new Zodios(endpoints)`}
{`export default ${name}`}
Expand Down

1 comment on commit 9b9674c

@vercel
Copy link

@vercel vercel bot commented on 9b9674c Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kubb – ./

kubb-kubb.vercel.app
kubb.dev
www.kubb.dev
kubb-git-main-kubb.vercel.app

Please sign in to comment.