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
Related #32
Using the same the petstore swagger.json, the generated TypeScript includes the following code:
loginUser(__params: UserApi.LoginUserRequest, options?: RequestInit): (fetch?: FetchAPI, basePath?: string) => Promise<UserApi.LoginUserResponse> { const localVarFetchArgs = UserApiFetchParamCreator(configuration).loginUser(__params, options); return async (fetch: FetchAPI = defaultFetch, basePath: string = BASE_PATH) => { const response = await fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options) const contentType = response.headers.get('Content-Type'); const mimeType = contentType ? contentType.replace(/;.*/, '') : undefined; if (response.status === 200) { if (mimeType === 'application/json') { return { status: 200, contentType: 'application/json', body: await response.json() as string, headers: { xExpiresAfter: response.headers.get('X-Expires-After'), xRateLimit: response.headers.get('X-Rate-Limit'), }, } } if (mimeType === 'application/xml') { return { status: 200, contentType: 'application/xml', body: await response.text(), headers: { xExpiresAfter: response.headers.get('X-Expires-After'), xRateLimit: response.headers.get('X-Rate-Limit'), }, } } throw response; } if (response.status === 400) { return { status: 400, /* No content */ } } throw response; }; },
It doesn't compile because of the following error,
The text was updated successfully, but these errors were encountered:
@taras thank you for reporting this... could you please post what was generated for UserApi.LoginUserResponse?
UserApi.LoginUserResponse
Sorry, something went wrong.
@karlvr thank you for looking into it. I pushed the generated code to a repo. You can find it here https://github.com/taras/backstage-openapi-client-scaffolding/blob/main/plugins/petstore-client-common/src/__generated__/api.ts#L1691
No branches or pull requests
Related #32
Using the same the petstore swagger.json, the generated TypeScript includes the following code:
It doesn't compile because of the following error,
The text was updated successfully, but these errors were encountered: