Open AdrianMachado opened 2 years ago
@jsdevel care to take a look?
@AdrianMachado please fix the build
@AdrianMachado can you fix the build?
Sorry I forgot about this. I will take a look this weekend
I just came across this PR after pulling my hair on the same problem upgrading to OpenAPI 3.1. What can we do to help get this merged @AdrianMachado @jsdevel?
@soul-codes hey - I haven't really had time to fix this - feel free to take it over
….OperationObject
Problem
In my project, I was trying to construct a OpenAPIV3_1 object as follows
When spreading the object I get the following error: https://pastebin.com/XwXWuavS
Solution
I wouldn't consider myself a savvy typescript guy, but I assume the issue is due to the way the
method
->OperationObject
gets tacked on as a intersection on both V3 and V3_1. This will probably result in typescript interpretingWhich I assume would just boil down to
To solve this, I
Omit
the original mapping ofmethod
toOpenAPIV3.OperationObject
and add it back asmethod
toOpenAPIV3_1.OperationObject
as an intersection at the end. I am not sure if this is the most elegant solution, but it does work.Sidenote: I also noticed a typescript error on
PathsWebhooksComponents
which I think I fixed too