Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Conversation

@kylef
Copy link
Member

@kylef kylef commented Jul 19, 2019

While reviewing this part of the OAS 2 code base I realised the index of an item in an array was being computed using indexOf while we are already in a function which has access to the index in the arguments.

In theory, this may also fix a bug where the source maps could be wrong if you had two identical invalid content types in produces or consumes. (The source maps would reference the first one). I haven't validated if such bug exists it was just speculation, it may be more likely there is a unique requirement for content-types which is validated upfront.

@kylef kylef added the openapi2 label Jul 19, 2019
@kylef kylef requested a review from pksunkara July 19, 2019 13:00
@pksunkara pksunkara merged commit 016861e into master Jul 19, 2019
@pksunkara pksunkara deleted the kylef/oas2-validate-ct branch July 19, 2019 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants