Skip to content
Discussion options

You must be logged in to vote

Hi @sergiolarrad,

The x-codegen-type is applied to the bean, not to individual properties. See the following example:

Pet:
  type: object
  properties:
    name:
      type: string
    description:
      type: string
    birthdate:
      type: string
      format: date-time
      description: Instant in local timezone when the event started
      example: "2025-09-19T13:11:21Z"
      x-codegen-type: "java.time.Instant" # Has no effect

As shown above, setting x-codegen-type on a property has no effect.

@EricWittmann, in my opinion, it would be really useful to support an annotation that allows overriding the type of a specific property as well. WDYT?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mcruzdev
Comment options

Answer selected by sergiolarrad
@mcruzdev
Comment options

@EricWittmann
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area:server This item is related to the server extension
4 participants