Skip to content

@Schema description while using i18n force default localization #1464

@t0kieu

Description

@t0kieu

Is your feature request related to a problem? Please describe.
@Schema description attribute is not localized, still force only the default localization.

Spring Boot version 2..6.3
Sprindocversion 1.6.6

Describe the solution you'd like
Generated component Schema RequestObject properties use only default i18n internationalization.

messages.properties:

key.1=word

messages_sk.properties

key.1=slovo
  @Schema(
      description = "key.1",
      type = "string",
      required = true,
      example = "car")
  @NotNull
  @Size(min = 1, max = 50)
  String word();

Rendered is this:

components:
  schemas:
    WordRequest:
      required:
      - word
      type: object
      properties:
        word:
          maxLength: 50
          minLength: 1
          type: string
          description: word
          example: car

Expected is this:

components:
  schemas:
    WordRequest:
      required:
      - word
      type: object
      properties:
        word:
          maxLength: 50
          minLength: 1
          type: string
          description: slovo
          example: car

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions