-
Notifications
You must be signed in to change notification settings - Fork 158
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
chore: fix OasSchema types #1362
Conversation
|
Thanks for pointing this out, @vladkens! I'd suggest using |
@tatomyr I see that you asked for further changes on this pull request. Can the existing changes be reviewed as they are, or do your requested updates also need to be included to make it useful? |
@lornajane for me it makes sense to do everything in one MR. If @vladkens won't respond, I'll make a separate update instead of this one once I have time. |
Hi, @tatomyr. Didn't see the notification in time. Fixed nested typing too and made Oas3_1Schema as interface. Also put the general properties for v3 & v3.1 in a separate internal interface. Please re-view PR. From my side checked with: npm run lint
npm run typecheck
npm run prettier:check |
Thank you @vladkens very much for handling all the comments! I'll review and merge your PR soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you again for your efforts @vladkens!
The changes will be available in the next release.
What/Why/How?
Fix wrong typing for
Oas3_1Schema
.When using
type
in TypeScript instead ofinterface
, need to omit all overridden fields first.Reference
https://www.typescriptlang.org/play?ssl=7&ssc=62&pln=1&pc=1#code/C4TwDgpgBAglC8UDeVSQFxQM7AE4EsA7AcygF8AoNaAIQVigDJlVwJMcCSoAfbPIsQDaAXXIUAxgHtCOKACNMdRCmqYhAIk6CNAGigbCAVwC28iLg1iyUAPS3WkLBIJhg2AIYgoF3FNxQABYWEBQU9thSUPjuWIFSRgA2ACYKodRQAML0APImMQA8MPoa1BoAfEwsavxcpHzaJKLi0rLuEpjZKo7sUJqNxHoGxmYWVuR2DoRRYH7yiRAmUNMA7kA
Testing
Screenshots (optional)
Check yourself
Security