Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: displaying nested items with type string #2634

Merged
merged 2 commits into from
Dec 31, 2024

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
9 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants