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

[Extend Governor APIs] Governor JSON Validator #74

Conversation

bailinhe
Copy link
Contributor

@bailinhe bailinhe commented Oct 4, 2023

A customized JSON schema validator used to validate extension resources against the JSON schema defined in Extension Resource Definitions. This validator can be extended to meet the needs of the governor-api, as an example, a unique-constrain is implemented that allows extension developer to define fields that are unique within a given ERD

@bailinhe bailinhe force-pushed the extend-governor-apis/json-schema-validator branch from a7a49b5 to 094be34 Compare October 4, 2023 20:18
@bailinhe bailinhe force-pushed the extend-governor-apis/json-schema-validator branch from 094be34 to 62dbdbe Compare October 13, 2023 16:25
@bailinhe bailinhe marked this pull request as ready for review October 13, 2023 16:33
@bailinhe bailinhe requested a review from a team as a code owner October 13, 2023 16:33
@bailinhe bailinhe force-pushed the extend-governor-apis/json-schema-validator branch 2 times, most recently from 366ebb6 to 04ae799 Compare October 13, 2023 18:24
Copy link
Contributor

@fishnix fishnix left a comment

Choose a reason for hiding this comment

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

Just a few comments - will this be imported by addons? If not should it be in internal ?

pkg/jsonschema/unique_constraint.go Outdated Show resolved Hide resolved
pkg/jsonschema/unique_constraint.go Outdated Show resolved Hide resolved
pkg/jsonschema/unique_constraint.go Show resolved Hide resolved
@bailinhe
Copy link
Contributor Author

Just a few comments - will this be imported by addons? If not should it be in internal ?

I hope this can be used for addons to self-validate the schemas provided by the developer, make sure they are compilable, perhaps as one of the tests in the addons

bailinhe and others added 2 commits October 17, 2023 22:25
Co-authored-by: E Camden Fisher <fish@fishnix.net>
@bailinhe bailinhe force-pushed the extend-governor-apis/json-schema-validator branch from ba2bff0 to 8a88876 Compare October 17, 2023 22:25
@bailinhe bailinhe force-pushed the extend-governor-apis/json-schema-validator branch from 8a88876 to 21f6918 Compare October 17, 2023 22:29
@bailinhe bailinhe requested a review from fishnix October 17, 2023 22:32
@bailinhe bailinhe merged commit 9cac4a8 into metal-toolbox:main Oct 18, 2023
@bailinhe bailinhe deleted the extend-governor-apis/json-schema-validator branch October 18, 2023 17:50
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