We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export const getApiJobSearchJobs = async (params?: GetApiJobSearchJobsParams, options?: RequestInit): Promise<JobResponse[]> => { const res = await fetch( getGetApiJobSearchJobsUrl(params), { ...options, method: 'GET' } ) console.log(res.status); return res.json() }
Using with svelte 4.
This is my config:
import { defineConfig } from 'orval'; import { API_URL } from './src/lib/constants'; export default defineConfig({ doc: { output: { baseUrl: API_URL, mode: 'tags-split', target: 'src/lib/types/server/api.ts', schemas: 'src/lib/types/server/models', client: 'fetch', mock: false }, input: { target: '../swagger.json' } } });
The text was updated successfully, but these errors were encountered:
We have no way of accepting it at the moment. However, I'm considering expanding the response type as follows:
https://gist.github.com/anymaniax/44c1331a5643081a82da070e45f405f0#file-http-instance-ts-L68-L72
Sorry, something went wrong.
I would like to update the generated code as follows:
// add response type export type listPetsResponse = { status: number; data: Pets; }; export const listPets = async ( params?: ListPetsParams, options?: RequestInit, ): Promise<listPetsResponse> => { const res = await fetch(getListPetsUrl(params), { ...options, method: 'GET', }); const data = await res.json(); return { status: res.status, data: data }; };
@melloware @taha-astera What's do yo think?
sounds good to me.
related #1387
fetch
soartec-lab
Successfully merging a pull request may close this issue.
What are the steps to reproduce this issue?
Using with svelte 4.
This is my config:
The text was updated successfully, but these errors were encountered: