Skip to content

feat(codegen): emit nullable.Value[T] when nullable-type is enabled#2067

Draft
frenchi wants to merge 1 commit into
oapi-codegen:mainfrom
frenchi:feat/nullable_value
Draft

feat(codegen): emit nullable.Value[T] when nullable-type is enabled#2067
frenchi wants to merge 1 commit into
oapi-codegen:mainfrom
frenchi:feat/nullable_value

Conversation

@frenchi

@frenchi frenchi commented Aug 27, 2025

Copy link
Copy Markdown

Follow-on PR from oapi-codegen/nullable#21.

Please do not merge this before nullable/pull/21 lands (tests won't pass anyway).

  • Switch generator from deprecated nullable.Nullable[T] to output nullable.Value[T] for nullable fields
  • Update schema tests to expect Value[T]
  • Update README to prefer nullable.Value with migration notes
  • Do not edit generated fixtures; regeneration will follow after library update

Before merging this PR, and after nullable/pull/21 lands:

  • Bump github.com/oapi-codegen/nullable version to the release that includes Value[T]. go get github.com/oapi-codegen/nullable
  • Run: go generate ./internal/test/issues/issue-1039 (and other fixtures) to re-emit nullable.Value[...].

- Switch generator to output nullable.Value[T] for nullable fields
- Update schema tests to expect Value[T]
- Update README to prefer nullable.Value with migration notes
- Do not edit generated fixtures; regeneration will follow after library update

Notes:
- Requires nullable library release containing Value[T]
- Regenerate test fixtures after bumping dependency

Refs: oapi-codegen/nullable#21
Pending: oapi-codegen/nullable#21
@frenchi
frenchi requested a review from a team as a code owner August 27, 2025 07:46
@kusari-inspector

Copy link
Copy Markdown

Kusari Inspector

Kusari Analysis Results:

Proceed with these changes

✅ No Flagged Issues Detected
All values appear to be within acceptable risk parameters.

Both dependency and code security analyses completed successfully with no critical security concerns identified. The new dependency github.com/oapi-codegen/nullable@1.1.0 originates from the same organization, has no known vulnerabilities, uses a permissive license, and is at the latest version. While the dependency shows low maintenance activity, this represents a development practice concern rather than a security risk, especially given the organizational relationship. The code analysis found no security vulnerabilities, exposed secrets, or other security issues. The combined risk profile remains low with appropriate mitigations focused on ongoing monitoring rather than blocking deployment.


Expand to see all dependency changes, security advisories, scorecard checks, etc.

Dependency Changes Introduced

Status Package Change Version Latest Version Advisories License
⚠️ Flagged github.com/oapi-codegen/nullable added 1.1.0 v1.1.0 None Apache-2.0 (permissive)

Scorecard Checks

github.com/oapi-codegen/nullable:

  • Maintained: 0/10 ⚠️ Repo is not maintained actively in the last 90 days.
  • Code Review: 2/10 ⚠️ Project does not require human code review before all pull requests (aka merge requests) are merged.
Files where issues may be found

Dependency Files:

  • go.mod

@kusari-inspector rerun - Trigger a re-analysis of this PR
@kusari-inspector feedback [your message] - Send feedback to our AI and team
See Kusari's documentation for setup and configuration.
Commit: 56c9c13, performed at: 2025-08-27T07:46:30Z

Found this helpful? Give it a 👍 or 👎 reaction!

@frenchi
frenchi marked this pull request as draft August 27, 2025 08:09
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.

1 participant