Skip to content

[REQ] Add Support for JSpecify Annotations #19955

@jorgerod

Description

@jorgerod

Following Spring Framework's decision to use JSpecify for nullability annotations, I think it would be very interesting to add this support to Openapi Generator.

TL;TR JSpecify
In Java code, whether an expression may evaluate to null is often documented only in natural language, if at all. JSpecify's nullness annotations let programmers express the nullness of Java code in a consistent and well-defined way.

JSpecify defines annotations that describe whether a Java type contains the value null. Such annotations are useful to (for example):

  • programmers reading the code,
  • tools that help developers avoid NullPointerExceptions,
  • tools that perform run-time checking and test generation, and
  • documentation systems.

It would be possible to add an option in which it would be configurable the option to follow (jakarta or JSpecify).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions