Skip to content

fix: displaying nested items with type string#2634

Merged
AlexVarchuk merged 2 commits intomainfrom
fix/string-items-restrictions
Dec 31, 2024
Merged

fix: displaying nested items with type string#2634
AlexVarchuk merged 2 commits intomainfrom
fix/string-items-restrictions

Conversation

@AlexVarchuk
Copy link
Collaborator

What/Why/How?

fix displaying nested items with type string.

Reference

fixes: #2516
fixes: #2544
#2358

Tests

EndpointIn:
      type: object
      properties:
        uid:
          description: Optional unique identifier for the endpoint
          type: string
          maxLength: 256
          minLength: 1
          pattern: ^[a-zA-Z0-9\-_.]+$
          example: unique-ep-identifier
          nullable: true
        plain_property:
          type: string
          pattern: '^[A-Z]+$'
          minLength: 1
          maxLength: 10
        array_items:
          type: array
          items:
            type: string
            pattern: '^[A-Z]+$'
            minLength: 1
            maxLength: 10
        macList:
          type: array
          description: MAC address list
          items:
            type: string
            pattern: ^([0-9a-f]{2}:){5}[0-9a-f]{2}$
        macList1:
          type: array
          description: MAC address list
          items:
            type: string
            pattern: ^([0-9a-f]{2}:){5}[0-9a-f]{2}$
            minLength: 17
            maxLength: 17
        channels:
          description: List of message channels this endpoint listens to (omit for all)
          type: array
          items:
            type: string
            maxLength: 128
            pattern: ^[a-zA-Z0-9\-_.]+$
            example: project_1337
          maxItems: 10
          minItems: 1
          uniqueItems: true
          nullable: true
          example:
            - project_123
            - group_2
        channels1:
          description: List of message channels this endpoint listens to (omit for all)
          type: array
          items:
            - type: string
              maxLength: 128
              pattern: ^[a-zA-Z0-9\-_.]+$
              example: project_1337
            - type: string
              maxLength: 128
              pattern: ^[a-zA-Z0-9\-_.]+$
              example: project_1337
          maxItems: 10
          minItems: 1
          uniqueItems: true
          nullable: true
          example:
            - project_123
            - group_2

Screenshots (optional)

BEFORE
Screenshot 2024-12-30 at 15 39 21

AFTER
Screenshot 2024-12-30 at 15 38 09

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@AlexVarchuk AlexVarchuk requested a review from a team as a code owner December 30, 2024 14:52
@AlexVarchuk AlexVarchuk self-assigned this Dec 30, 2024
@AlexVarchuk AlexVarchuk merged commit 85b622f into main Dec 31, 2024
7 checks passed
@AlexVarchuk AlexVarchuk deleted the fix/string-items-restrictions branch December 31, 2024 11:09
@tasn
Copy link

tasn commented Dec 31, 2024

Thanks!

@AlexVarchuk AlexVarchuk mentioned this pull request Jan 16, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minLength/maxLength not shown for array items with pattern Regex/value ranges (and other item properties) don't show for lists of items

3 participants