-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: Refactor schema validation to support type-specific logic and pr…
…event AttributeTypes/ElementType field panics Reference: #574 Reference: #699 Reference: #704 Reference: #705 The goal of this change is to enable easier schema validation within the framework logic. This is achieved by implementing new internal interfaces that implement shared logic across all schema types, then introduce methods on attribute types which currently implement type-specific validation logic. The new `ValidateImplementation()` methods on attribute types, while technically exported, cannot be implemented externally due to their usage of internal types. This follows the existing implementation of the framework where attribute types already cannot be extended due to the `Equal(fwschema.Attribute)` method requirement. Therefore these new `ValidateImplementation()` methods do not need to worry about compatibility promises and can be modified or removed in the future. This change also includes some breadcrumbs for other schema validation requests.
- Loading branch information
Showing
83 changed files
with
4,111 additions
and
2,393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: BUG FIXES | ||
body: 'datasource/schema: Raise errors with `ListAttribute`, `MapAttribute`, `ObjectAttribute`, | ||
and `SetAttribute` implementations instead of panics when missing required `AttributeTypes` or | ||
`ElementTypes` fields' | ||
time: 2023-03-29T10:28:50.525346-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: BUG FIXES | ||
body: 'provider/metaschema: Raise errors with `ListAttribute`, `MapAttribute`, `ObjectAttribute`, | ||
and `SetAttribute` implementations instead of panics when missing required `AttributeTypes` or | ||
`ElementTypes` fields' | ||
time: 2023-03-29T10:28:51.525346-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: BUG FIXES | ||
body: 'provider/schema: Raise errors with `ListAttribute`, `MapAttribute`, `ObjectAttribute`, | ||
and `SetAttribute` implementations instead of panics when missing required `AttributeTypes` or | ||
`ElementTypes` fields' | ||
time: 2023-03-29T10:28:52.525346-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: BUG FIXES | ||
body: 'resource/schema: Raise errors with `ListAttribute`, `MapAttribute`, `ObjectAttribute`, | ||
and `SetAttribute` implementations instead of panics when missing required `AttributeTypes` or | ||
`ElementTypes` fields' | ||
time: 2023-03-29T10:28:53.525346-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ENHANCEMENTS | ||
body: 'datasource/schema: Added `Schema` type `ValidateImplementation()` method, which performs framework-defined | ||
schema validation and can be used in unit testing' | ||
time: 2023-03-29T10:21:06.251285-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ENHANCEMENTS | ||
body: 'provider/metaschema: Added `Schema` type `ValidateImplementation()` method, which performs framework-defined | ||
schema validation and can be used in unit testing' | ||
time: 2023-03-29T10:21:07.251285-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ENHANCEMENTS | ||
body: 'provider/schema: Added `Schema` type `ValidateImplementation()` method, which performs framework-defined | ||
schema validation and can be used in unit testing' | ||
time: 2023-03-29T10:21:08.251285-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: ENHANCEMENTS | ||
body: 'resource/schema: Added `Schema` type `ValidateImplementation()` method, which performs framework-defined | ||
schema validation and can be used in unit testing' | ||
time: 2023-03-29T10:21:09.251285-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: NOTES | ||
body: 'datasource/schema: The `Schema` type `Validate()` method has been deprecated | ||
in preference of `ValidateImplementation()`' | ||
time: 2023-03-29T12:43:36.636825-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: NOTES | ||
body: 'provider/metaschema: The `Schema` type `Validate()` method has been deprecated | ||
in preference of `ValidateImplementation()`' | ||
time: 2023-03-29T12:43:37.636825-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: NOTES | ||
body: 'provider/schema: The `Schema` type `Validate()` method has been deprecated | ||
in preference of `ValidateImplementation()`' | ||
time: 2023-03-29T12:43:38.636825-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: NOTES | ||
body: 'resource/schema: The `Schema` type `Validate()` method has been deprecated | ||
in preference of `ValidateImplementation()`' | ||
time: 2023-03-29T12:43:39.636825-04:00 | ||
custom: | ||
Issue: "699" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.