title: How to prevent openapi-generator from using wildcard imports in java
body: <p>How can I prevent <code>openapi-generator</code> from using wildcard imports like <code>import javax.validation.constraints.*;</code> in Java?</p>
  <p>This import is used in every class of a specified REST API in which the keyword <code>required</code> is used for a property. For example in this snipped:</p>
  <pre><code>...
  components:
    schemas:
      SimpleRequest:
        description: Simple request with a required property.
        type: object
        required:
          - requestID
        properties:
          requestID:
            type: string
  ...
  </code></pre>
  <p>Here the generated java code has a class for the object SimpleRequest which has the property requestID which can't be Null.
  This is indicated by a <code>@NotNull</code> above the field in the generated code. Instead of using the wildcard import, the generator could have used this import intead: <code>import javax.validation.constraints.NotNull;</code></p>