Skip to content

Conversation

@iT0ny
Copy link

@iT0ny iT0ny commented Oct 22, 2025

Context

Duplicate of #830. This PR implements the additional changes/fixes for issues surfaced in the original PR

Summary

  • Move OpenAPIKit to 4.x
  • Refresh handling of null values
  • Fix tests

Details

  • Bump OpenAPIKit version so we target 4.x, and raise the Yams requirement to 5.1+
  • Update wording in testEmitsComplexOpenAPIParsingError and testSchemaWarningsForwardedToGeneratorDiagnostics (Tests/OpenAPIGeneratorCoreTests/Parser/Test_YamsParser.swift, Tests/OpenAPIGeneratorCoreTests/Translator/TypesTranslator/Test_translateSchemas.swift)
  • Update checks for null values in Sources/_OpenAPIGeneratorCore/Translator/CommonTranslations/translateRawEnum.swift
  • Update OpenAPI.Content.Encoding usage according to the OpenAPIKit v4 migration guide in Tests/OpenAPIGeneratorCoreTests/Translator/TypeAssignment/Test_TypeMatcher.swift

Testing

  • swift test
  • CI run

Fixes #821

@czechboy0
Copy link
Contributor

Thank you @iT0ny, which of the changes were required when bumping the OpenAPIKit version, and which ones were nice to have?

@iT0ny
Copy link
Author

iT0ny commented Oct 22, 2025

Thank you @iT0ny, which of the changes were required when bumping the OpenAPIKit version, and which ones were nice to have?

All of them are required, tests mentioned in the PR message were failing. + there was an issue with nil checks after the version bump

@iT0ny iT0ny force-pushed the update-openapi-kit-to-v4 branch from 1c0603e to a2407d9 Compare October 23, 2025 00:52
@iT0ny
Copy link
Author

iT0ny commented Oct 23, 2025

updated user.email to correctly point to my GitHub email address

@mattpolzin
Copy link
Contributor

Heads up that because of a change that merged into main between when this PR was opened and now, you'll need to require OpenAPIKit v4.3.1 or greater once you've rebased on latest main.

@iT0ny iT0ny force-pushed the update-openapi-kit-to-v4 branch from 04d9eea to 0aa0187 Compare October 28, 2025 13:43
@iT0ny
Copy link
Author

iT0ny commented Oct 28, 2025

Thanks, done! @mattpolzin

@mattpolzin
Copy link
Contributor

@czechboy0 more of a procedural question: what is your versioning strategy around bumping OpenAPIKit major versions?

Some potential considerations:

  • Getting to version 4 of OpenAPIKit unlocks the ability to build external dereferencing into the generator, but getting to OpenAPIKit v5 will unlock OAS 3.2.0 features.
  • I can't say how quickly I'll be able to get v5 out because OAS 3.2.0 actually represents a pretty substantial list of additions to the spec.

@czechboy0
Copy link
Contributor

TBD, but it's possible we'll do a leap from 3 to 5 directly, as even moving to 4 would require a bit more qualification on my end that I don't have time for right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update OpenAPIKit dependency to 4.x

3 participants