Skip to content

feat: implement Java-to-OpenAPI type mapping #25

Description

@soulcodingmatt

Task

Implement the mapping from Java field types to OpenAPI schema types.

Parent story: #12
Parent epic: #18

Details

Map these Java types to OpenAPI types:

  • Stringtype: string
  • int/Integer, long/Longtype: integer
  • double/Double, float/Float, BigDecimaltype: number
  • boolean/Booleantype: boolean
  • LocalDatetype: string, format: date
  • LocalDateTime/Instanttype: string, format: date-time
  • List<T>type: array, items: <T>
  • Set<T>type: array, items: <T>, uniqueItems: true
  • Map<K,V>type: object, additionalProperties: <V>
  • Nested DTOs → $ref: '#/components/schemas/NestedDtoName'

Acceptance Criteria

  • All primitive and wrapper types are correctly mapped
  • Collection types (List, Set, Map) are correctly mapped
  • Date/time types use correct OpenAPI format strings
  • Nested DTO references use $ref
  • Unit tests cover all type mappings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions