Skip to content

feat: map validation constraints to OpenAPI schema properties #27

Description

@soulcodingmatt

Task

Propagate Equilibrium validation annotations to corresponding OpenAPI schema constraints.

Parent story: #12
Parent epic: #18

Details

Map validation annotations to OpenAPI properties:

  • @NotNull → field in required array
  • @NotBlankminLength: 1
  • @Size(min, max)minLength/maxLength (strings) or minItems/maxItems (arrays)
  • @Min(n)minimum: n
  • @Max(n)maximum: n
  • @Pattern(regexp)pattern: regexp
  • @Emailformat: email
  • @PositiveexclusiveMinimum: 0
  • @NegativeexclusiveMaximum: 0

Acceptance Criteria

  • Each supported validation annotation maps to the correct OpenAPI property
  • Multiple constraints on the same field are combined correctly
  • Unsupported annotations are silently ignored (no errors)
  • Unit tests cover each constraint mapping

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