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

Support for min and max value validation #94

Open
2 tasks done
dikhan opened this issue Jan 31, 2019 · 0 comments
Open
2 tasks done

Support for min and max value validation #94

dikhan opened this issue Jan 31, 2019 · 0 comments

Comments

@dikhan
Copy link
Owner

dikhan commented Jan 31, 2019

Is your feature request related to a problem?

Currently maximum and minimum attributes are not supported in the provider, hence terraform configuration may contain invalid values which will end up being posted to the API, and the API would return an error. This feature requests adds support for both

prefix_length_v2:
  maximum: 28
  minimum: 25
  type: integer

Describe the solution you'd like

When the openapi terraform provider runs into a property that has max and min described, those should be added to the validation function for that property in the provider schema configuration so if the user terraform config contains non valid errors Terraform will fail upfront without the need to make and API call.

Acceptance criteria

ValidateFunc for a property containing maximum and minimum attributes would apply expected validation on the value inout by the user. If the value is not valid, terraform should return an error.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Checklist

Don't forget to go through the checklist to make sure the issue is created properly:

  • I have added a corresponding label (feature request/bug/etc) to the issue (right side menu)
  • I have added this issue to the 'API Terraform Provider' GitHub project (right side menu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant