Skip to content

fix: ignore a nullable annotation for enums that use enumAsRef - #5312

Open
Mattias-Sehlstedt wants to merge 1 commit into
swagger-api:masterfrom
Mattias-Sehlstedt:enum-as-ref-with-nullable-annotation
Open

fix: ignore a nullable annotation for enums that use enumAsRef#5312
Mattias-Sehlstedt wants to merge 1 commit into
swagger-api:masterfrom
Mattias-Sehlstedt:enum-as-ref-with-nullable-annotation

Conversation

@Mattias-Sehlstedt

Copy link
Copy Markdown
Contributor

Pull Request

Thank you for contributing to swagger-core!

Please fill out the following information to help us review your PR efficiently.


Description

Fixes so that an enum that uses enumAsRef = true ignores any @Nullable annotation when processing for nullable. This since the project does not yet support nullable refs.

I elected to place it within the resolveSchemaMembers next to resolveNullable rather than analyzing an enum when it is created as a ref in to make it easier to analyze and adjust the nullable resolving when nullable refs become supported.

Fixes: #5310

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)

@Mattias-Sehlstedt
Mattias-Sehlstedt force-pushed the enum-as-ref-with-nullable-annotation branch from 6d199e4 to 6d0bcb5 Compare September 3, 2026 19:57
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.

[Bug]: @Nullable property mutates shared enumAsRef component schema in OpenAPI 3.1

1 participant