test: use SpecVersion enum in tests in preparation for OAS 3.2
Pull Request
Thank you for contributing to swagger-core!
Please fill out the following information to help us review your PR efficiently.
Description
The swagger ecosystem has started moving towards supporting OAS 3.2. As part of enabling that in swagger-core, it would be helpful to move away from the previous binary openapi31 boolean configuration, and instead attempting to move to using the SpecVersion enum (which can then be extended with V32 and any version that comes after that).
I have for example introduced support for OAS 3.2 tags on a branch, but it is more difficulty to review and reason about due to the changes to the version handling necessary. Thus I would find it beneficial if we could remove the usage of the boolean flag before any 3.2 functionality was introduced. The same applies to another recent PR tied to 3.2 QUERY operation functionality.
My general approach is to implement the functionality first, and analyze what workflows are cumbersome, and then extract the fixes for the cumbersome parts as a separate PR without the new functionality.
Relates to https://github.com/swagger-api/swagger-core/issues/5181
Type of Change
- ๐ Bug fix
- โจ New feature
- โป๏ธ Refactor (non-breaking change)
- ๐งช Tests
- ๐ Documentation
- ๐งน Chore (build or tooling)
Checklist
- I have added/updated tests as needed
- I have added/updated documentation where applicable
- The PR title is descriptive
- The code builds and passes tests locally
- I have linked related issues (if any)