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 validator #8

Merged
merged 7 commits into from
Aug 23, 2023
Merged

feat: add validator #8

merged 7 commits into from
Aug 23, 2023

Conversation

tao12345666333
Copy link
Contributor

No description provided.

Signed-off-by: Jintao Zhang <[email protected]>
cmd/validate.go Show resolved Hide resolved
return false, fmt.Errorf(errWrap, resourceType, nameOrID, err)
}
defer resp.Body.Close()
return resp.StatusCode == http.StatusOK, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

@lingsamuel I think sdk can support this API.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should parse the invalid info from the response body and return as an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, let me check the response content of the APISIX API

internal/pkg/validator/validator.go Outdated Show resolved Hide resolved
Signed-off-by: Jintao Zhang <[email protected]>
@tao12345666333 tao12345666333 merged commit 524b2a0 into main Aug 23, 2023
@tao12345666333 tao12345666333 deleted the feat-validator branch August 23, 2023 08:18
bzp2010 added a commit to bzp2010/adc that referenced this pull request Jul 12, 2024
bzp2010 pushed a commit to bzp2010/adc that referenced this pull request Jul 12, 2024
bzp2010 added a commit to bzp2010/adc that referenced this pull request Jul 12, 2024
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.

3 participants