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

feat: add pattern validation for string array items in blueprint resource #200

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Add pattern validation for string array items in blueprint resource

This PR adds support for pattern validation in string array items, bringing parity with the existing pattern validation in string properties.

Changes

  • Added pattern field to StringItems struct in model.go
  • Added pattern schema attribute to string_items in schema.go
  • Updated array property tests to verify pattern validation

Example Usage

resource "port_blueprint" "regex" {
  properties = {
    array_props = {
      "stringArrayProp" = {
        string_items = {
          pattern = "^[a-zA-Z0-9]*$"
        }
      }
    }
  }
}

Testing

  • Added test case in TestAccPortBlueprintArrayProperty
  • CI will run acceptance tests to verify the changes

Link to Devin run: https://app.devin.ai/sessions/dadd4fe884b349059f2308a19d705996

…urce

- Added pattern field to StringItems struct in model.go
- Added pattern schema attribute to string_items in schema.go
- Updated array property tests to verify pattern validation

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@erikzaadi
Copy link
Member

You'll need to manually run make gen-docs once and add the changed markdown files

Copy link
Member

@erikzaadi erikzaadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@OmriGez OmriGez merged commit f8b450f into main Jan 13, 2025
4 checks passed
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.

2 participants