-
-
Notifications
You must be signed in to change notification settings - Fork 525
Incorrect tuples generation with v6.x #1011
New issue
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
Comments
This appears to be working in my tests (6.1.1). Could you confirm if this is still happening? i.e. using your example the output is: /**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/tupleTest": {
post: {
requestBody: {
content: {
"application/json; charset=UTF-8": {
tupleTest: [string, number];
};
};
};
};
};
}
export interface components {}
export interface operations {}
export interface external {} |
@mitchell-merry : I also have the same problem here export interface paths {
"/tupleTest": {
post: {
requestBody: {
content: {
"application/json; charset=UTF-8": {
tupleTest: ([[object Object], [object Object]])[];
};
};
};
};
};
}
export type webhooks = Record<string, never>;
export type components = Record<string, never>;
export type external = Record<string, never>;
export type operations = Record<string, never>; |
Agree this needs to be supported. Though I believe the spec requires |
I think items also need support! https://json-schema.org/understanding-json-schema/reference/array.html#tuple-validation |
Description
Hello. Thank you very much for your great work on this library 👍 !!
From v6.0 tuples stopped being properly generated.
I get the following :
openapi-typescript
6.1.0
16.13.0
Windows 10
Reproduction
Expected result
With v5.4.0 I get :
Checklist
The text was updated successfully, but these errors were encountered: