Comments (6)
Hey, can you share your config, which version you're on, and OpenAPI spec?
from openapi-ts.
Hey, can you share your config, which version you're on, and OpenAPI spec?
Version should be 0.45.1
, the config is below
import { defineConfig } from '@hey-api/openapi-ts';
export default defineConfig({
client: 'fetch',
input: '../dashboard/api.json',
output: {
format: false,
lint: false,
path: 'src/client',
},
types: {
enums: 'typescript',
},
});
from openapi-ts.
I assume the same happens with the latest version? Can you share your OpenAPI spec?
from openapi-ts.
I assume the same happens with the latest version? Can you share your OpenAPI spec?
Yes it does happen on 0.46.2
, I can provide the spec but it's not gonna do much for this specifically this is the part that is probably causing the issue, I should add that it generates the code below, I'll also add an expected behaviour
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "{}"
}
}
}
}
},
Generates:
export type StoreRequestData = {
acceptLanguage?: string;
formData?: {
[key: string]: ();
};
service: string;
};
I'd expect it to be
export type StoreRequestData = {
acceptLanguage?: string;
formData?: {
[key: string]: unknown;
};
service: string;
};
from openapi-ts.
Great, thanks! And what does your payload passed to form data look like?
from openapi-ts.
Great, thanks! And what does your payload passed to form data look like?
It's a simple structure, there's no depth, some values are string
, some are Date
some are File
, I haven't had a look at the files, I'll have to see if they work or not
from openapi-ts.
Related Issues (20)
- Remove `$OpenApiTs` from type generation file HOT 1
- [methodNameBuilder] KO without asClass: true, HOT 4
- Typescript client not working when fastapi responses are in camelCase HOT 6
- Generic Types Not Resolving Correctly HOT 1
- Get response headers HOT 19
- Specifying local client doesn't work - it's overridden by global client HOT 5
- "import" isn't always renamed to "_import" when generating schema HOT 6
- How can I customize withCredentials option in axios? HOT 9
- combination of anyOf with root properties produces union of all including the root HOT 1
- Duplicated response type caused by long $ref HOT 8
- type generation with server side event HOT 1
- AdditionalProperties renders as `unknown`
- Export types from `@hey-api/client-fetch` HOT 5
- There will be an error when operationId is a js keyword, I think we should give this class a prefix or something HOT 7
- Login API with OAuth2PasswordRequestForm Fails Due to Incorrect Content-Type HOT 6
- Dependency-free support for new Fetch API client
- Node.js errors seem not caught by the library HOT 1
- Downloading a PDF file from generated contract throws error as treating file a JSON HOT 5
- Unable to prompt browser to save file with 'content-disposition: attachment;' HOT 4
- Explicit type annotation for all exports HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-ts.